mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
roq: fix excessive memory alloc
Fixes Ticket802 Bug found by: Oana Stratulat Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a8469223f6
commit
c1acd58198
@ -30,6 +30,7 @@
|
||||
#include "libavutil/intreadwrite.h"
|
||||
#include "avformat.h"
|
||||
#include "internal.h"
|
||||
#include "avio_internal.h"
|
||||
|
||||
#define RoQ_MAGIC_NUMBER 0x1084
|
||||
#define RoQ_CHUNK_PREAMBLE_SIZE 8
|
||||
@ -125,6 +126,8 @@ static int roq_read_packet(AVFormatContext *s,
|
||||
if(chunk_size > INT_MAX)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
chunk_size = ffio_limit(pb, chunk_size);
|
||||
|
||||
switch (chunk_type) {
|
||||
|
||||
case RoQ_INFO:
|
||||
|
Loading…
Reference in New Issue
Block a user