[FFmpeg-devel] [PATCH] Fix of invalid read outside input buffer when decoding vorbis
Måns Rullgård
mans
Wed Jul 16 01:01:47 CEST 2008
Siarhei Siamashka <siarhei.siamashka at gmail.com> writes:
> Hi,
>
> This problem was reported by valgrind ("Invalid read of size 4").
>
> --
> Best regards,
> Siarhei Siamashka
>
> Index: libavformat/oggparsevorbis.c
> ===================================================================
> --- libavformat/oggparsevorbis.c (revision 14214)
> +++ libavformat/oggparsevorbis.c (working copy)
> @@ -146,7 +146,7 @@
> memcpy(&ptr[offset], priv->packet[i], priv->len[i]);
> offset += priv->len[i];
> }
> - *buf = av_realloc(*buf, offset);
> + *buf = av_realloc(*buf, offset + FF_INPUT_BUFFER_PADDING_SIZE);
> return offset;
> }
Applied. Thanks.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list