summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-24 00:45:02 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-24 00:45:02 +0100
commitbba6f5b77f69e0b7fb00b3f346422715fc602f55 (patch)
tree3b1a17486c377e86daf4141e7900676fe6461332 /libavcodec/h264.c
parentad9e0ed170234bc6c5660f96752777965081163e (diff)
parent8b94df0f2047e9728cb872adc9e64557b7a5152f (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: vp3dec: Check coefficient index in vp3_dequant() svq1dec: call avcodec_set_dimensions() after dimensions changed. Prepare for 0.8_beta1 snapshot release threads: check defines before using them in automatic thread detection pthread: include sys/types.h before sys/sysctl.h 4xm: remove unused variables. h264: Fix a possible overread in decode_nal_units() allfilters: fix type of avfilter_vsrc_buffer. w32thread: call ResetEvent() in pthread_cond_broadcast(). Conflicts: Changelog RELEASE doc/RELEASE_NOTES libavcodec/pthread.c libavcodec/vp3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 9978188620..f6fcc84eaa 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3803,7 +3803,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
int err;
if(buf_index >= next_avc) {
- if(buf_index >= buf_size) break;
+ if (buf_index >= buf_size - h->nal_length_size) break;
nalsize = 0;
for(i = 0; i < h->nal_length_size; i++)
nalsize = (nalsize << 8) | buf[buf_index++];