diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-07-07 20:19:51 +0200 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-07-08 15:20:20 +0200 |
commit | 83a940e7fb9640954d631870e2ec6e8b3fc528ed (patch) | |
tree | 1a690dcac7730f3541da6e7d8afb80429291d38e | |
parent | c3e9b098e12b8932693361625d4a69bc30583d9a (diff) | |
download | ffmpeg-83a940e7fb9640954d631870e2ec6e8b3fc528ed.tar.gz |
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.
-rw-r--r-- | libavcodec/h2645_parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c index 26f2e85ab8..ef872fe88c 100644 --- a/libavcodec/h2645_parse.c +++ b/libavcodec/h2645_parse.c @@ -293,7 +293,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 */ |