X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fwebcollage-helper-cocoa.m;h=1b5fadfb3daecddedae080d72726b2a02fc52412;hp=6c6e9d2ba236039ee2deff34cb7deedaabf701c7;hb=5f9c47ca98dd43d8f59b7c27d3fde6edfde4fe21;hpb=50be9bb40dc60130c99ffa568e6677779904ff70 diff --git a/hacks/webcollage-helper-cocoa.m b/hacks/webcollage-helper-cocoa.m index 6c6e9d2b..1b5fadfb 100644 --- a/hacks/webcollage-helper-cocoa.m +++ b/hacks/webcollage-helper-cocoa.m @@ -382,6 +382,12 @@ main (int argc, char **argv) if (w < 0) usage(); if (h < 0) usage(); + if (w == 0 || h == 0 || + w > 10240 || h > 10240) { + fprintf (stderr, "%s: absurd size: %d x %d\n", progname, w, h); + exit (1); + } + // Much of Cocoa needs one of these to be available. NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];