[FFmpeg-devel] [PATCH] avformat/rmenc: limit packet size
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Sat Feb 28 23:40:30 CET 2015
On 28.02.2015 23:35, Clément Bœsch wrote:
> On Sat, Feb 28, 2015 at 11:32:59PM +0100, Andreas Cadhalpun wrote:
>> diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c
>> index 838388f..1567834 100644
>> --- a/libavformat/rmenc.c
>> +++ b/libavformat/rmenc.c
>> @@ -396,6 +396,10 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int
>> /* Well, I spent some time finding the meaning of these bits. I am
>> not sure I understood everything, but it works !! */
>> #if 1
>> + if (size > 0xFFFF - 7 - 4 - 12) {
>> + av_log(s, AV_LOG_ERROR, "paket size %d too large\n", size);
>> + return AVERROR(EINVAL);
>> + }
>
> If anyone applies this, please fix the packet typo.
Sorry about the typo, fixed patch attached.
Best regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-avformat-rmenc-limit-packet-size.patch
Type: text/x-diff
Size: 1189 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150228/1adc06db/attachment.bin>
More information about the ffmpeg-devel
mailing list