diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2009-08-29 23:02:01 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2009-08-29 23:02:01 +0000 |
commit | 7248797c03e8fcddc1f1ab5887d1e53cc691a2c2 (patch) | |
tree | cc857d4d3e00cb2ce1a204299e25d8538b732f78 /libswscale/colorspace-test.c | |
parent | e48a0966caacd63ea77add7eeb905ef3cf2b2373 (diff) | |
download | ffmpeg-7248797c03e8fcddc1f1ab5887d1e53cc691a2c2.tar.gz |
swscale: Check for return values of malloc.
Originally committed as revision 29584 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/colorspace-test.c')
-rw-r--r-- | libswscale/colorspace-test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libswscale/colorspace-test.c b/libswscale/colorspace-test.c index dbdf6bef90..5a48065d1f 100644 --- a/libswscale/colorspace-test.c +++ b/libswscale/colorspace-test.c @@ -66,6 +66,9 @@ int main(int argc, char **argv) int failedNum=0; int passedNum=0; + if (!srcBuffer || !dstBuffer) + return -1; + av_log(NULL, AV_LOG_INFO, "memory corruption test ...\n"); args_parse(argc, argv); av_log(NULL, AV_LOG_INFO, "CPU capabilities forced to %x\n", cpu_caps); |