[FFmpeg-cvslog] avcodec/h263dec: Fix use of uninitialized memory from the bitstream buffer

Michael Niedermayer git at videolan.org
Tue Mar 18 18:26:06 CET 2014


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 18 18:06:17 2014 +0100| [f07cebcd910c97ff6012085c21493231752990e9] | committer: Michael Niedermayer

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

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f07cebcd910c97ff6012085c21493231752990e9
---

 libavcodec/h263dec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index e231b08..df2d7d3 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -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);



More information about the ffmpeg-cvslog mailing list