aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-18 18:06:17 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-04-22 00:21:27 +0200
commitaf1bf7f2772a7a9c2af511c7e933500f0361878d (patch)
tree82438b969d9d256f951b9f38b7e461656966f52d
parente770488b50445a29fae5369e099ebf2fa35414f4 (diff)
downloadffmpeg-af1bf7f2772a7a9c2af511c7e933500f0361878d.tar.gz
avcodec/h263dec: Fix use of uninitialized memory from the bitstream buffer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit f07cebcd910c97ff6012085c21493231752990e9) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h263dec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index a0cb82c624..8809e8e5d4 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -720,10 +720,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);