diff options
Diffstat (limited to 'libavutil/pixelutils.c')
-rw-r--r-- | libavutil/pixelutils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/pixelutils.c b/libavutil/pixelutils.c index ca424d89e4..10ff7e801a 100644 --- a/libavutil/pixelutils.c +++ b/libavutil/pixelutils.c @@ -128,6 +128,12 @@ int main(void) uint8_t *buf2 = av_malloc(W2*H2); uint32_t state = 0; + if (!buf1 || !buf2) { + fprintf(stderr, "malloc failure\n"); + ret = 1; + goto end; + } + for (i = 0; i < W1*H1; i++) { state = state * 1664525 + 1013904223; buf1[i] = state>>24; |