mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-12 18:25:03 +00: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>
(cherry picked from commit da857099e9
)
This commit is contained in:
parent
3e8771e99e
commit
515aa63e4d
@ -1472,6 +1472,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