Commit efe286af authored by lorenm's avatar lorenm

fix some crashes on negative nalsize.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5022 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 307f3372
......@@ -7507,6 +7507,15 @@ static int decode_nal_units(H264Context *h, uint8_t *buf, int buf_size){
nalsize = 0;
for(i = 0; i < h->nal_length_size; i++)
nalsize = (nalsize << 8) | buf[buf_index++];
if(nalsize <= 1){
if(nalsize == 1){
buf_index++;
continue;
}else{
av_log(h->s.avctx, AV_LOG_ERROR, "AVC: nal size %d\n", nalsize);
break;
}
}
} else {
// start code prefix search
for(; buf_index + 3 < buf_size; buf_index++){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment