[FFmpeg-cvslog] tools/probetest: Check av_realloc() return code
Michael Niedermayer
git at videolan.org
Wed Dec 11 22:50:28 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 11 22:28:56 2013 +0100| [37437d97a8e6c72240c75b0b43fa7cb193f871f7] | committer: Michael Niedermayer
tools/probetest: Check av_realloc() return code
Fixess CID1135761
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37437d97a8e6c72240c75b0b43fa7cb193f871f7
---
tools/probetest.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/probetest.c b/tools/probetest.c
index dd1a0bc..b685e3d 100644
--- a/tools/probetest.c
+++ b/tools/probetest.c
@@ -110,6 +110,11 @@ int main(int argc, char **argv)
pd.buf = av_realloc(pd.buf, size + AVPROBE_PADDING_SIZE);
pd.filename = "";
+ if (!pd.buf) {
+ fprintf(stderr, "out of memory\n");
+ return 1;
+ }
+
memset(pd.buf, 0, size + AVPROBE_PADDING_SIZE);
fprintf(stderr, "testing size=%d\n", size);
More information about the ffmpeg-cvslog
mailing list