mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
h264: Fix a possible overread in decode_nal_units()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
82d05e78a6
commit
bc6a3bd4a5
@ -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++];
|
||||
|
Loading…
Reference in New Issue
Block a user