Browse Source

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>
tags/n4.0
James Almer 7 years ago
parent
commit
9482ec1b20
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/hevc.c

+ 2
- 0
libavformat/hevc.c View File

@@ -669,6 +669,8 @@ static uint8_t *nal_unit_extract_rbsp(const uint8_t *src, uint32_t src_len,
while (i < src_len) while (i < src_len)
dst[len++] = src[i++]; dst[len++] = src[i++];


memset(dst + len, 0, AV_INPUT_BUFFER_PADDING_SIZE);

*dst_len = len; *dst_len = len;
return dst; return dst;
} }


Loading…
Cancel
Save