mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
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:
parent
14b74610d7
commit
a7e8b0f360
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user