From c0f0bec2f205e567fc0eef8a9bf59d585e14094c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 13 Oct 2012 21:05:13 +0200 Subject: [PATCH] sws-test: check W/H Fixes CID733834 Signed-off-by: Michael Niedermayer --- libswscale/swscale-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libswscale/swscale-test.c b/libswscale/swscale-test.c index 085aecb5fd..dde94739f0 100644 --- a/libswscale/swscale-test.c +++ b/libswscale/swscale-test.c @@ -316,7 +316,8 @@ static int fileTest(uint8_t *ref[4], int refStride[4], int w, int h, FILE *fp, srcFormat = av_get_pix_fmt(srcStr); dstFormat = av_get_pix_fmt(dstStr); - if (srcFormat == AV_PIX_FMT_NONE || dstFormat == AV_PIX_FMT_NONE) { + if (srcFormat == AV_PIX_FMT_NONE || dstFormat == AV_PIX_FMT_NONE || + srcW > 1024U || srcH > 1024U || dstW > 1024U || dstH > 1024U) { fprintf(stderr, "malformed input file\n"); return -1; }