You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/pgxdec: Remove pointless checks
These checks were (most likely) added to check for overreads as the bytestream2_get_* functions return 0 in this case. Yet this is not necessary anymore as we now have an explicit check for the size. Should the input contain a real \0, pgx_get_number() will error out lateron. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -69,14 +69,11 @@ static int pgx_decode_header(AVCodecContext *avctx, GetByteContext *g,
|
|||||||
} else if (byte == '-') {
|
} else if (byte == '-') {
|
||||||
*sign = 1;
|
*sign = 1;
|
||||||
bytestream2_skipu(g, 1);
|
bytestream2_skipu(g, 1);
|
||||||
} else if (byte == 0)
|
}
|
||||||
goto error;
|
|
||||||
|
|
||||||
byte = bytestream2_peek_byteu(g);
|
byte = bytestream2_peek_byteu(g);
|
||||||
if (byte == ' ')
|
if (byte == ' ')
|
||||||
bytestream2_skipu(g, 1);
|
bytestream2_skipu(g, 1);
|
||||||
else if (byte == 0)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
if (pgx_get_number(avctx, g, depth))
|
if (pgx_get_number(avctx, g, depth))
|
||||||
goto error;
|
goto error;
|
||||||
|
Reference in New Issue
Block a user