On Sat, Feb 28, 2015 at 11:40:30PM +0100, Andreas Cadhalpun wrote:
> From 4bb0687f07713787f83dcd90214ad32b91c0f91f Mon Sep 17 00:00:00 2001
> From: Andreas Cadhalpun <[email protected]>
> Date: Sat, 28 Feb 2015 23:11:50 +0100
> Subject: [PATCH] avformat/rmenc: limit packet size
Just "rm" is enough to denote the module.
> --- 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) {
That looks slightly magicky ... What are those numbers?
> + av_log(s, AV_LOG_ERROR, "packet size %d too large\n", size);
> + return AVERROR(EINVAL);
INVALIDDATA
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel