mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-02-13 19:05:37 +00:00
avcodec/cfhd: Fix negative shift in cfhd_decode()
Fixes: left shift of negative value -1 Fixes: 30714/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4867823371419648 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
07de796b5d
commit
cd3ab3a09b
1 changed files with 2 additions and 2 deletions
|
|
@ -811,7 +811,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
|
|||
const uint16_t q = s->quantisation;
|
||||
|
||||
for (i = 0; i < run; i++) {
|
||||
*coeff_data |= coeff << 8;
|
||||
*coeff_data |= coeff * 256;
|
||||
*coeff_data++ *= q;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -842,7 +842,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
|
|||
const uint16_t q = s->quantisation;
|
||||
|
||||
for (i = 0; i < run; i++) {
|
||||
*coeff_data |= coeff << 8;
|
||||
*coeff_data |= coeff * 256;
|
||||
*coeff_data++ *= q;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue