projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41540b3
)
parser: fix large overreads
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 3 Oct 2012 14:06:23 +0000
(16:06 +0200)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Fri, 7 Dec 2012 21:15:02 +0000
(16:15 -0500)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
libavcodec/parser.c
patch
|
blob
|
history
diff --git
a/libavcodec/parser.c
b/libavcodec/parser.c
index
7ace766
..
0767a34
100644
(file)
--- a/
libavcodec/parser.c
+++ b/
libavcodec/parser.c
@@
-254,7
+254,9
@@
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s
if(!new_buffer)
return AVERROR(ENOMEM);
pc->buffer = new_buffer;
- memcpy(&pc->buffer[pc->index], *buf, next + FF_INPUT_BUFFER_PADDING_SIZE );
+ if (next > -FF_INPUT_BUFFER_PADDING_SIZE)
+ memcpy(&pc->buffer[pc->index], *buf,
+ next + FF_INPUT_BUFFER_PADDING_SIZE);
pc->index = 0;
*buf= pc->buffer;
}