mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Return failure on comment mismatch in CLI decompression
The final comment verification check in DecompressFile() detects when comment_state is not COMMENT_OK but unconditionally returns BROTLI_TRUE. This causes the -C (comment verification) flag to accept streams with missing or mismatched comments, keeping the output file and exiting 0. Add the missing return BROTLI_FALSE inside the mismatch branch so that comment verification failures are properly propagated to the caller.
This commit is contained in:
@@ -1293,6 +1293,7 @@ static BROTLI_BOOL DecompressFile(Context* context) {
|
||||
if (context->verbosity > 0) {
|
||||
fprintf(stderr, "reason: comment mismatch\n");
|
||||
}
|
||||
return BROTLI_FALSE;
|
||||
}
|
||||
return BROTLI_TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user