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>
This commit is contained in:
Peter Ross 2022-01-21 09:01:57 +11:00
parent c69b1a12bb
commit 5903a4e321
1 changed files with 2 additions and 2 deletions

View File

@ -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) &&