summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorAlexandra Khirnova <alexandra.khirnova@gmail.com>2013-09-18 18:12:36 +0200
committerDiego Biurrun <diego@biurrun.de>2013-09-18 18:28:38 +0200
commit5626f994f273af80fb100d4743b963304de9e05c (patch)
tree69a48a5383a83d06f8e25df3098cce219788e873 /libavformat/utils.c
parent0f310a6f333b016d336674d086045e8473fdf918 (diff)
avformat: Use av_reallocp() where suitable
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3d4366ae56..22f6d01207 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -266,7 +266,8 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
}
/* read probe data */
- buf = av_realloc(buf, probe_size + AVPROBE_PADDING_SIZE);
+ if ((ret = av_reallocp(&buf, probe_size + AVPROBE_PADDING_SIZE)) < 0)
+ return ret;
if ((ret = avio_read(pb, buf + buf_offset, probe_size - buf_offset)) < 0) {
/* fail if error was not end of file, otherwise, lower score */
if (ret != AVERROR_EOF) {