Repository navigation
obs-ffmpeg: Clear RIST credentials on close so open failure frees them once (#482) - #705
Merged
Merged
Conversation
(cherry picked from commit 065661a)
…them once (GREEN) librist_open closes the context on its failure paths and connect_mpegts_url's fail path closes it again. librist_close released the secret, username and password without clearing the pointers, so the second close released the same strings again. Clear each pointer after release so close is idempotent. (cherry picked from commit eb28de0)
cmocka's will_return/expect queues crashed inside _mock (strcmp) on the MSVC Tier 2 build. Plain statics, like the rist_destroy counter, keep the same checks on every platform.
Member
Author
|
Windows Tier 2 crashed inside cmocka's |
10 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #482
Refs #686
Fix by @chriscoveries (
chriscoveries/obsrust-forkfix/rist-open-failure-cleanup), cherry-picked with-x, authorship kept.librist_opencloses the context on its failure paths, andconnect_mpegts_url's fail path closes it again;librist_closefreed secret/username/password without clearing the pointers, so the second close freed them again. The fix clears each pointer afterbfree.RED → GREEN
rust/tools/linux-validate/run.sh, OFF and ON):test_rist_open_cleanupFAILED:encrypted_url_cleanup_test,parse_failure_cleanup_test,repeated_close_test(196/197)../lintok.