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
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue