1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Avoid huge memory allocations from asf demuxer.

Fixes ticket #1888.
This commit is contained in:
Carl Eugen Hoyos 2013-03-02 18:37:55 +01:00
parent 1d5b35cc07
commit 6091a8d92d

View File

@ -1011,6 +1011,7 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb)
asf->packet_obj_size = avio_rl32(pb);
if (asf->packet_obj_size >= (1 << 24) || asf->packet_obj_size <= 0) {
av_log(s, AV_LOG_ERROR, "packet_obj_size invalid\n");
asf->packet_obj_size = 0;
return AVERROR_INVALIDDATA;
}
asf->packet_frag_timestamp = avio_rl32(pb); // timestamp