diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-25 13:42:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-25 13:45:26 +0200 |
commit | da4e4d65f456f170e75865807d21a8b5ed5ea4d7 (patch) | |
tree | b084e7ed43bed6591a8da8b66ee5b1424a0f6407 /libavcodec/aacdec.c | |
parent | aa604e8e33ae06f3a106e44fff798fdd70d77230 (diff) | |
download | ffmpeg-streaming-da4e4d65f456f170e75865807d21a8b5ed5ea4d7.zip ffmpeg-streaming-da4e4d65f456f170e75865807d21a8b5ed5ea4d7.tar.gz |
aacdec: reorder multiuplications to make code safer against too large input values.
Fixes CID700697
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r-- | libavcodec/aacdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index f180d78..44869c5 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -1242,7 +1242,7 @@ static void decode_mid_side_stereo(ChannelElement *cpe, GetBitContext *gb, for (idx = 0; idx < cpe->ch[0].ics.num_window_groups * cpe->ch[0].ics.max_sfb; idx++) cpe->ms_mask[idx] = get_bits1(gb); } else if (ms_present == 2) { - memset(cpe->ms_mask, 1, cpe->ch[0].ics.num_window_groups * cpe->ch[0].ics.max_sfb * sizeof(cpe->ms_mask[0])); + memset(cpe->ms_mask, 1, sizeof(cpe->ms_mask[0]) * cpe->ch[0].ics.num_window_groups * cpe->ch[0].ics.max_sfb); } } |