Fix OSS-Fuzz #385993744 - #18972
Closed
ndossche wants to merge 1 commit into
Closed
Conversation
PSFS_FEED_ME is supposed to be returned when the filter did not receive enough data and did not generate buckets for the output brigade. The test generates buckets anyway on the output brigade, and the stream layer did not handle that case causing a memory leak. To solve this, discard any such buckets as it would conflict with the status code returned by the filter. This keeps BC and solves the leak.
devnexen
reviewed
Jun 29, 2025
| * we will read again, otherwise out job is done here */ | ||
|
|
||
| /* Filter could have added buckets anyway, but signalled that it did not return any. Discard them. */ | ||
| while ((bucket = brig_outp->head)) { |
Member
There was a problem hiding this comment.
just little nit: is the style difference voluntary (i.e. initialising the var in while) ?
Member
Author
There was a problem hiding this comment.
I just copy pasted this snippet, both styles are used, I didn't particularly care but I can change it if you want
Member
There was a problem hiding this comment.
no that s fine if you want like this.
devnexen
approved these changes
Jul 17, 2025
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.
PSFS_FEED_ME is supposed to be returned when the filter did not receive enough data and did not generate buckets for the output brigade. The test generates buckets anyway on the output brigade, and the stream layer did not handle that case causing a memory leak. To solve this, discard any such buckets as it would conflict with the status code returned by the filter. This keeps BC and solves the leak.