Fixes CID733834 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Unified · Split
| @@ -316,7 +316,8 @@ static int fileTest(uint8_t *ref[4], int refStride[4], int w, int h, FILE *fp, · 315 unmodified lines | ||
| 316 | 316 | srcFormat = av_get_pix_fmt(srcStr); |
| 317 | 317 | dstFormat = av_get_pix_fmt(dstStr); |
| 318 | 318 | |
| 319 | − if (srcFormat == AV_PIX_FMT_NONE || dstFormat == AV_PIX_FMT_NONE) { | |
| 319 | + if (srcFormat == AV_PIX_FMT_NONE || dstFormat == AV_PIX_FMT_NONE || | |
| 320 | + srcW > 1024U || srcH > 1024U || dstW > 1024U || dstH > 1024U) { | |
| 320 | 321 | fprintf(stderr, "malformed input file\n"); |
| 321 | 322 | return -1; |
| 322 | 323 | } |