Module: libav
Branch: release/12
Commit: 502e1a0db9d3d52ca3321d014d9c93610c8f6fff

Author:    James Almer <jamr...@gmail.com>
Committer: Sean McGovern <gsean...@gmail.com>
Date:      Fri Feb 23 00:09:38 2018 -0300

hvcc: zero initialize the nal buffers past the last written byte

Bug-Id: 1116
Cc: libav-sta...@libav.org

Signed-off-by: James Almer <jamr...@gmail.com>
(cherry picked from commit dc40e64adb1712b1209c018914a44f809bc32664)
Signed-off-by: Sean McGovern <gsean...@gmail.com>

---

 libavformat/hevc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/hevc.c b/libavformat/hevc.c
index c835f22..6b0831d 100644
--- a/libavformat/hevc.c
+++ b/libavformat/hevc.c
@@ -656,6 +656,8 @@ static uint8_t *nal_unit_extract_rbsp(const uint8_t *src, 
uint32_t src_len,
     while (i < src_len)
         dst[len++] = src[i++];
 
+    memset(dst + len, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+
     *dst_len = len;
     return dst;
 }

_______________________________________________
libav-commits mailing list
libav-commits@libav.org
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to