diff options
author | Peter Ross <pross@xvid.org> | 2022-01-21 09:01:57 +1100 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2022-02-04 11:52:26 +1100 |
commit | 5903a4e32104ab343555b494991856fac5aa3aa2 (patch) | |
tree | e03e206e7287ddc8f395ead3099483e01b669063 /libavformat/img2dec.c | |
parent | c69b1a12bb6231bd648cf29c1d99282e2d5e68d0 (diff) |
avformat/img2dec: fix logic error in GEM Raster file probe
Use correct logic to express limits of the planes and pattern_size fields.
Fix ticket# 9605
Signed-off-by: Peter Ross <pross@xvid.org>
Diffstat (limited to 'libavformat/img2dec.c')
-rw-r--r-- | libavformat/img2dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c index 4d5ac51b53..2583ca2465 100644 --- a/libavformat/img2dec.c +++ b/libavformat/img2dec.c @@ -1115,8 +1115,8 @@ static int gem_probe(const AVProbeData *p) int ret = 0; if ( AV_RB16(b ) >= 1 && AV_RB16(b ) <= 3 && AV_RB16(b + 2) >= 8 && AV_RB16(b + 2) <= 779 && - (AV_RB16(b + 4) > 0 || AV_RB16(b + 4) <= 8) && - (AV_RB16(b + 6) > 0 || AV_RB16(b + 6) <= 8) && + (AV_RB16(b + 4) > 0 && AV_RB16(b + 4) <= 32) && /* planes */ + (AV_RB16(b + 6) > 0 && AV_RB16(b + 6) <= 8) && /* pattern_size */ AV_RB16(b + 8) && AV_RB16(b + 10) && AV_RB16(b + 12) && |