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

Michael Niedermayer git at videolan.org
Tue Mar 18 18:58:46 CET 2014


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

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

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit f07cebcd910c97ff6012085c21493231752990e9)

Conflicts:

	libavcodec/h263dec.c

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

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

diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 7db32e7..58358ad 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -755,10 +755,9 @@ frame_end:
         }
 
         if (startcode_found) {
-            av_fast_malloc(&s->bitstream_buffer,
+            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,



More information about the ffmpeg-cvslog mailing list