mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 18:49:58 +00:00
Merge commit '640a2427aafa774b83316b7a8c5c2bdc28bfd269'
* commit '640a2427aafa774b83316b7a8c5c2bdc28bfd269': bfi: Add some very basic sanity checks for input packet sizes Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
ccb6b056df
@ -136,6 +136,10 @@ static int bfi_read_packet(AVFormatContext * s, AVPacket * pkt)
|
||||
video_offset = avio_rl32(pb);
|
||||
audio_size = video_offset - audio_offset;
|
||||
bfi->video_size = chunk_size - video_offset;
|
||||
if (audio_size < 0 || bfi->video_size < 0) {
|
||||
av_log(s, AV_LOG_ERROR, "Invalid audio/video offsets or chunk size\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
//Tossing an audio packet at the audio decoder.
|
||||
ret = av_get_packet(pb, pkt, audio_size);
|
||||
|
Loading…
Reference in New Issue
Block a user