Mercurial > libavformat.hg
changeset 1660:e071dbfd4769 libavformat
fix segfault with http://sam.zoy.org/zzuf/lol-ffplay.wmv
author | michael |
---|---|
date | Mon, 15 Jan 2007 23:47:53 +0000 |
parents | 82323178664b |
children | 1c022c843762 |
files | asf.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/asf.c Mon Jan 15 22:56:46 2007 +0000 +++ b/asf.c Mon Jan 15 23:47:53 2007 +0000 @@ -601,6 +601,10 @@ assert(asf->packet_replic_size >= 8); // it should be always at least 8 bytes - FIXME validate asf->packet_obj_size = get_le32(pb); + if(asf->packet_obj_size >= (1<<24) || asf->packet_obj_size <= 0){ + av_log(s, AV_LOG_ERROR, "packet_obj_size invalid\n"); + continue; + } asf->packet_frag_timestamp = get_le32(pb); // timestamp if (asf->packet_replic_size > 8) url_fskip(pb, asf->packet_replic_size - 8);