[FFmpeg-cvslog] h2645_parse: don't overread AnnexB NALs within an avc stream
Hendrik Leppkes
git at videolan.org
Thu Aug 25 05:21:43 EEST 2016
ffmpeg | branch: release/3.1 | Hendrik Leppkes <h.leppkes at gmail.com> | Thu Jul 7 20:19:51 2016 +0200| [0ad4d4198a40f3907b77390d525bf6fd7868538f] | committer: Michael Niedermayer
h2645_parse: don't overread AnnexB NALs within an avc stream
We know the maximum size of an AnnexB NAL, signaling it as the maximum
NAL size allows ff_h2645_extract_rbsp to determine the correct size.
(cherry picked from commit 83a940e7fb9640954d631870e2ec6e8b3fc528ed)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ad4d4198a40f3907b77390d525bf6fd7868538f
---
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 50837b6..4d18de8 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -291,7 +291,7 @@ int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
buf += 3;
length -= 3;
- extract_length = length;
+ extract_length = FFMIN(length, next_avc - buf);
if (buf >= next_avc) {
/* skip to the start of the next NAL */
More information about the ffmpeg-cvslog
mailing list