You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +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:
@@ -56,9 +56,8 @@ static int pgx_decode_header(AVCodecContext *avctx, GetByteContext *g,
|
|||||||
{
|
{
|
||||||
int byte;
|
int byte;
|
||||||
|
|
||||||
if (bytestream2_get_bytes_left(g) < 6) {
|
if (bytestream2_get_bytes_left(g) < 12)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
|
||||||
|
|
||||||
bytestream2_skip(g, 6);
|
bytestream2_skip(g, 6);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user