From 5626f994f273af80fb100d4743b963304de9e05c Mon Sep 17 00:00:00 2001 From: Alexandra Khirnova Date: Wed, 18 Sep 2013 18:12:36 +0200 Subject: avformat: Use av_reallocp() where suitable Signed-off-by: Diego Biurrun --- libavformat/oggparsevorbis.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libavformat/oggparsevorbis.c') diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index adf8f0360a..1a9776ef15 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -173,7 +173,7 @@ static unsigned int fixup_vorbis_headers(AVFormatContext * as, struct oggvorbis_private *priv, uint8_t **buf) { - int i,offset, len; + int i, offset, len, err; unsigned char *ptr; len = priv->len[0] + priv->len[1] + priv->len[2]; @@ -188,7 +188,8 @@ fixup_vorbis_headers(AVFormatContext * as, struct oggvorbis_private *priv, offset += priv->len[i]; av_freep(&priv->packet[i]); } - *buf = av_realloc(*buf, offset + FF_INPUT_BUFFER_PADDING_SIZE); + if ((err = av_reallocp(buf, offset + FF_INPUT_BUFFER_PADDING_SIZE)) < 0) + return err; return offset; } -- cgit v1.2.3