Skip to content

Commit

Permalink
Only locally disable signed integer sanitizing on decoder fuzzers
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmf01 committed May 28, 2022
1 parent 6b2fc73 commit 9e14376
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libFLAC/fixed.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ void FLAC__fixed_compute_residual(const FLAC__int32 data[], uint32_t data_len, u
}
}

#if defined(__clang__)
#ifdef FUZZING_BUILD_MODE_NO_SANITIZE_SIGNED_INTEGER_OVERFLOW
/* The attribute below is to silence the undefined sanitizer of oss-fuzz.
* Because fuzzing feeds bogus predictors and residual samples to the
* decoder, having overflows in this section is unavoidable. Also,
Expand Down
3 changes: 2 additions & 1 deletion src/libFLAC/lpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,8 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients_wide(const FLAC__int32 * f

#endif /* !defined FLAC__INTEGER_ONLY_LIBRARY */

#if defined(__clang__)

#ifdef FUZZING_BUILD_MODE_NO_SANITIZE_SIGNED_INTEGER_OVERFLOW
/* The attribute below is to silence the undefined sanitizer of oss-fuzz.
* Because fuzzing feeds bogus predictors and residual samples to the
* decoder, having overflows in this section is unavoidable. Also,
Expand Down
2 changes: 1 addition & 1 deletion src/libFLAC/stream_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -2986,7 +2986,7 @@ FLAC__bool read_callback_(FLAC__byte buffer[], size_t *bytes, void *client_data)
*/
}

#if defined(__clang__)
#ifdef FUZZING_BUILD_MODE_NO_SANITIZE_SIGNED_INTEGER_OVERFLOW
/* The attribute below is to silence the undefined sanitizer of oss-fuzz.
* Because fuzzing feeds bogus predictors and residual samples to the
* decoder, having overflows in this section is unavoidable. Also,
Expand Down

0 comments on commit 9e14376

Please sign in to comment.