summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_mp4toannexb_bsf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/h264_mp4toannexb_bsf.c')
-rw-r--r--libavcodec/h264_mp4toannexb_bsf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c
index 1693989..a5da84a 100644
--- a/libavcodec/h264_mp4toannexb_bsf.c
+++ b/libavcodec/h264_mp4toannexb_bsf.c
@@ -201,7 +201,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
buf += ctx->length_size;
unit_type = *buf & 0x1f;
- if (buf + nal_size > buf_end || nal_size < 0)
+ if (nal_size > buf_end - buf || nal_size < 0)
goto fail;
if (unit_type == 7)
OpenPOWER on IntegriCloud