tools/probetest: Check av_realloc() return code

Fixess CID1135761
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-12-11 22:28:56 +01:00
parent f6173fed60
commit 37437d97a8
1 changed files with 5 additions and 0 deletions

View File

@ -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);