Commit ccf7aee2 authored by michael's avatar michael

check to detect nonsense fragment size


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7653 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ebfa38c3
...@@ -571,6 +571,10 @@ static int asf_read_frame_header(AVFormatContext *s){ ...@@ -571,6 +571,10 @@ static int asf_read_frame_header(AVFormatContext *s){
} }
if (asf->packet_flags & 0x01) { if (asf->packet_flags & 0x01) {
DO_2BITS(asf->packet_segsizetype >> 6, asf->packet_frag_size, 0); // 0 is illegal DO_2BITS(asf->packet_segsizetype >> 6, asf->packet_frag_size, 0); // 0 is illegal
if(asf->packet_frag_size > asf->packet_size_left - rsize){
av_log(s, AV_LOG_ERROR, "packet_frag_size is invalid\n");
return -1;
}
//printf("Fragsize %d\n", asf->packet_frag_size); //printf("Fragsize %d\n", asf->packet_frag_size);
} else { } else {
asf->packet_frag_size = asf->packet_size_left - rsize; asf->packet_frag_size = asf->packet_size_left - rsize;
......
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