diff options
author | James Almer <jamrial@gmail.com> | 2018-02-23 00:03:15 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-02-24 00:37:13 -0300 |
commit | e0750d2067dc71133cf1c16c0884bd605a4578c7 (patch) | |
tree | 971dd0f899a7f9089248b4837b6353d408278209 /libavformat | |
parent | 8ae9bbef87f89f7ea0633b86bf0cadf243bc488f (diff) | |
download | ffmpeg-e0750d2067dc71133cf1c16c0884bd605a4578c7.tar.gz |
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@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 9482ec1b203e4cf51d7f60c85d261cc13f9a9d2f)
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/hevc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/hevc.c b/libavformat/hevc.c index 7c294ef8a2..4c7ffc3312 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -668,6 +668,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; } |