aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Niedermayer2013-12-11 22:28:56 +0100
committerMichael Niedermayer2013-12-11 22:29:22 +0100
commit37437d97a8e6c72240c75b0b43fa7cb193f871f7 (patch)
tree97bc3f23221ca0cf6549b630bd2dcf94e59d3108 /tools
parentf6173fed608b81e70f40664f356d127618851427 (diff)
tools/probetest: Check av_realloc() return code
Fixess CID1135761 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools')
-rw-r--r--tools/probetest.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/probetest.c b/tools/probetest.c
index dd1a0bcabb..b685e3d6c2 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);