mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-08 15:50:18 +00:00
ivi_common: check that scan pattern is set before using it.
Fixes CVE-2012-2791.
CC: libav-stable@libav.org
(cherry picked from commit deabb52ab4
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
parent
398d4e8669
commit
3fca5799c6
@ -411,6 +411,11 @@ int ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile)
|
||||
}
|
||||
|
||||
if (cbp & 1) { /* block coded ? */
|
||||
if (!band->scan) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Scan pattern is not set.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
scan_pos = -1;
|
||||
memset(trvec, 0, num_coeffs*sizeof(trvec[0])); /* zero transform vector */
|
||||
memset(col_flags, 0, sizeof(col_flags)); /* zero column flags */
|
||||
|
Loading…
Reference in New Issue
Block a user