summaryrefslogtreecommitdiff
path: root/libavcodec/hevc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-08-18 20:41:31 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-18 23:36:18 +0200
commitcc13bc8c4f0f4afa30d0b94c3f3a369ccd2aaf0b (patch)
treecc951b2cf772d43ea307d0fb7bced2a8325a1763 /libavcodec/hevc.c
parente2a39b103e5917780744fed6fd4336cf65a220f4 (diff)
avcodec/h2645: Fix NAL unit padding
The parser changes have lost the support for the needed padding, this adds it back Fixes out of array reads Fixes: 03ea21d271abc8acf428d42ace51d8b4/asan_heap-oob_3358eef_5692_16f0cc01ab5225e9ce591659e5c20e35.mkv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r--libavcodec/hevc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index b478065db2..cb1263cb43 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -2867,7 +2867,7 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
/* split the input packet into NAL units, so we know the upper bound on the
* number of slices in the frame */
ret = ff_h2645_packet_split(&s->pkt, buf, length, s->avctx, s->is_nalff,
- s->nal_length_size, s->avctx->codec_id);
+ s->nal_length_size, s->avctx->codec_id, 1);
if (ret < 0) {
av_log(s->avctx, AV_LOG_ERROR,
"Error splitting the input into NAL units.\n");