ffmpeg | branch: master | Hendrik Leppkes <[email protected]> | Sat May 7 16:28:39 2016 +0200| [d46e85635070fd2c4cd7cd4b97720e5868c1bfc1] | committer: Derek Buitenhuis
h265_parse: skip zero sized NAL units Avoids extra error checks later on and/or invalid reads. Signed-off-by: Derek Buitenhuis <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d46e85635070fd2c4cd7cd4b97720e5868c1bfc1 --- libavcodec/h2645_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c index aac9f99..62d0447 100644 --- a/libavcodec/h2645_parse.c +++ b/libavcodec/h2645_parse.c @@ -333,7 +333,7 @@ int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length, ret = hevc_parse_nal_header(nal, logctx); else ret = h264_parse_nal_header(nal, logctx); - if (ret <= 0) { + if (ret <= 0 || nal->size <= 0) { if (ret < 0) { av_log(logctx, AV_LOG_ERROR, "Invalid NAL unit %d, skipping.\n", nal->type); _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
