Module: libav Branch: master Commit: bc6a3bd4a544608211f006e2d2868cbed4e1fde6
Author: Alexander Strange <[email protected]> Committer: Anton Khirnov <[email protected]> Date: Mon Dec 12 18:13:39 2011 -0500 h264: Fix a possible overread in decode_nal_units() Signed-off-by: Anton Khirnov <[email protected]> --- libavcodec/h264.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index a9a1051..2bde0fe 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3764,7 +3764,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++]; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
