[FFmpeg-cvslog] hvcc: zero initialize the nal buffers past the last written byte

James Almer git at videolan.org
Tue Mar 6 00:34:52 EET 2018


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Feb 23 00:09:38 2018 -0300| [dc40e64adb1712b1209c018914a44f809bc32664] | committer: James Almer

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

Bug-Id: 1116
Cc: libav-stable at libav.org

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc40e64adb1712b1209c018914a44f809bc32664
---

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

diff --git a/libavformat/hevc.c b/libavformat/hevc.c
index f8bfeebd31..1f8a7bb3c6 100644
--- a/libavformat/hevc.c
+++ b/libavformat/hevc.c
@@ -657,6 +657,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;
 }



More information about the ffmpeg-cvslog mailing list