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 da857099e92fb7fede6d7b9e6b26879ce9c5a483)
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…
x
Reference in New Issue
Block a user