From: Michael Niedermayer Date: Sun, 31 Dec 2006 18:09:21 +0000 (+0000) Subject: check x/y validity X-Git-Tag: v0.5~10678 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cfe9cfede815dc8212b7be637d7253e5ff8a40ed;p=platform%2Fupstream%2Flibav.git check x/y validity a more generic solution is welcome of course ... Originally committed as revision 7389 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/ffplay.c b/ffplay.c index a97924e..7aab007 100644 --- a/ffplay.c +++ b/ffplay.c @@ -2308,11 +2308,19 @@ static void event_loop(void) void opt_width(const char *arg) { screen_width = atoi(arg); + if(screen_width<=0){ + fprintf(stderr, "invalid width\n"); + exit(1); + } } void opt_height(const char *arg) { screen_height = atoi(arg); + if(screen_height<=0){ + fprintf(stderr, "invalid height\n"); + exit(1); + } } static void opt_format(const char *arg)