[FFmpeg-devel] [PATCH] avformat/hevc: zero initialize the nal buffers past the last written byte
James Almer
jamrial at gmail.com
Fri Feb 23 05:05:54 EET 2018
Prevents use of uninitialized values.
Fixes ticket #7038.
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavformat/hevc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/hevc.c b/libavformat/hevc.c
index e45d2c08d2..3628d5a028 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;
}
--
2.16.2
More information about the ffmpeg-devel
mailing list