sws-test: check W/H

Fixes CID733834
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-13 21:05:13 +02:00
parent 2c85727f6c
commit c0f0bec2f2
1 changed files with 2 additions and 1 deletions

View File

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