mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avformat/utils: Add av_assert1 to preclude NULL + len, len != 0
Such a scenario is undefined behaviour and would also indicate a bug in our code. Suggested-by: James Almer <jamrial@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
c0d0b1c4f6
commit
da857099e9
@ -1426,6 +1426,7 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt,
|
||||
pkt->pts = pkt->dts = AV_NOPTS_VALUE;
|
||||
pkt->pos = -1;
|
||||
/* increment read pointer */
|
||||
av_assert1(data || !len);
|
||||
data = len ? data + len : data;
|
||||
size -= len;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user