avcodec/pgxdec: Make better use of size check
Each of the three calls to pgx_get_number() consumes at least two bytes. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -56,9 +56,8 @@ static int pgx_decode_header(AVCodecContext *avctx, GetByteContext *g,
|
||||
{
|
||||
int byte;
|
||||
|
||||
if (bytestream2_get_bytes_left(g) < 6) {
|
||||
if (bytestream2_get_bytes_left(g) < 12)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
bytestream2_skip(g, 6);
|
||||
|
||||
|
Reference in New Issue
Block a user