diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-18 21:41:31 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-19 00:36:18 +0300 |
commit | cc13bc8c4f0f4afa30d0b94c3f3a369ccd2aaf0b (patch) | |
tree | cc951b2cf772d43ea307d0fb7bced2a8325a1763 /libavcodec/h264_parse.c | |
parent | e2a39b103e5917780744fed6fd4336cf65a220f4 (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/h264_parse.c')
-rw-r--r-- | libavcodec/h264_parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_parse.c b/libavcodec/h264_parse.c index 1d4b1e4d82..0c873196dc 100644 --- a/libavcodec/h264_parse.c +++ b/libavcodec/h264_parse.c @@ -337,7 +337,7 @@ static int decode_extradata_ps(const uint8_t *data, int size, H264ParamSets *ps, H2645Packet pkt = { 0 }; int i, ret = 0; - ret = ff_h2645_packet_split(&pkt, data, size, logctx, is_avc, 2, AV_CODEC_ID_H264); + ret = ff_h2645_packet_split(&pkt, data, size, logctx, is_avc, 2, AV_CODEC_ID_H264, 1); if (ret < 0) { ret = 0; goto fail; |