OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bad505
)
avcodec/mpeg4videodec: use av_fast_padded_malloc() for bitstream buffer
author
Michael Niedermayer
<michaelni@gmx.at>
Tue, 7 Jan 2014 00:27:23 +0000
(
01:27
+0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Tue, 7 Jan 2014 00:29:38 +0000
(
01:29
+0100)
Fixes use of uninitialized memory with vlc (sample from ticket3277)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpeg4videodec.c
patch
|
blob
|
history
diff --git
a/libavcodec/mpeg4videodec.c
b/libavcodec/mpeg4videodec.c
index
34ec2b3
..
1771e71
100644
(file)
--- a/
libavcodec/mpeg4videodec.c
+++ b/
libavcodec/mpeg4videodec.c
@@
-2653,10
+2653,9
@@
int ff_mpeg4_frame_end(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
}
if (startcode_found) {
- av_fast_malloc(&s->bitstream_buffer,
+ av_fast_
padded_
malloc(&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,