[FFmpeg-cvslog] avformat/hvcc: zero initialize the nal buffers past the last written byte
James Almer
git at videolan.org
Sat Feb 24 05:44:09 EET 2018
ffmpeg | branch: release/3.4 | James Almer <jamrial at gmail.com> | Fri Feb 23 00:03:15 2018 -0300| [e4b95f710ba4df47e0437d6f90065cc6d4b92c1d] | committer: James Almer
avformat/hvcc: zero initialize the nal buffers past the last written byte
Prevents use of uninitialized values.
Fixes ticket #7038.
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit 9482ec1b203e4cf51d7f60c85d261cc13f9a9d2f)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e4b95f710ba4df47e0437d6f90065cc6d4b92c1d
---
libavformat/hevc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/hevc.c b/libavformat/hevc.c
index 1a2d6cdd2b..25898937a5 100644
--- a/libavformat/hevc.c
+++ b/libavformat/hevc.c
@@ -669,6 +669,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