OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c0ec4b
)
h264: prevent an out of array read in decode_nal_units()
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 11 Sep 2011 05:23:00 +0000
(07:23 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 11 Sep 2011 05:23:00 +0000
(07:23 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264.c
patch
|
blob
|
history
diff --git
a/libavcodec/h264.c
b/libavcodec/h264.c
index
958c859
..
0703c6b
100644
(file)
--- a/
libavcodec/h264.c
+++ b/
libavcodec/h264.c
@@
-3646,7
+3646,7
@@
static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
s->workaround_bugs |= FF_BUG_TRUNCATED;
if(!(s->workaround_bugs & FF_BUG_TRUNCATED)){
- while(
ptr[dst_length - 1] == 0 && dst_length >
0)
+ while(
dst_length > 0 && ptr[dst_length - 1] ==
0)
dst_length--;
}
bit_length= !dst_length ? 0 : (8*dst_length - ff_h264_decode_rbsp_trailing(h, ptr + dst_length - 1));