[FFmpeg-cvslog] sws-test: check W/H
Michael Niedermayer
git at videolan.org
Sat Oct 13 21:18:33 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 21:05:13 2012 +0200| [c0f0bec2f205e567fc0eef8a9bf59d585e14094c] | committer: Michael Niedermayer
sws-test: check W/H
Fixes CID733834
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c0f0bec2f205e567fc0eef8a9bf59d585e14094c
---
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 085aecb..dde9473 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;
}
More information about the ffmpeg-cvslog
mailing list