avcodec/h263dec: Fix use of uninitialized memory from the bitstream buffer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-03-18 18:06:17 +01:00
parent d0ba12fa0c
commit f07cebcd91

View File

@@ -721,10 +721,10 @@ frame_end:
}
if(startcode_found){
av_fast_malloc(
av_fast_padded_mallocz(
&s->bitstream_buffer,
&s->allocated_bitstream_buffer_size,
buf_size - current_pos + FF_INPUT_BUFFER_PADDING_SIZE);
buf_size - current_pos);
if (!s->bitstream_buffer)
return AVERROR(ENOMEM);
memcpy(s->bitstream_buffer, buf + current_pos, buf_size - current_pos);