1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/pixlet: Reorder rlen check

This changes nothing but is nicer looking as this checks rlen

Maybe this helps coverity remove CID1397743

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-04-08 03:34:45 +02:00
parent 8dd0c12648
commit c94d551ea7

View File

@ -173,7 +173,7 @@ static int read_low_coeffs(AVCodecContext *avctx, int16_t *dst, int size, int wi
}
}
if (i + rlen > size)
if (rlen > size - i)
return AVERROR_INVALIDDATA;
i += rlen;