Commit 37437d97 authored by Michael Niedermayer's avatar Michael Niedermayer

tools/probetest: Check av_realloc() return code

Fixess CID1135761
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f6173fed
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment