# HG changeset patch # User meillo@marmaro.de # Date 1216714047 -7200 # Node ID 159402d54c29395ee4bdf754957c87c9f9865977 # Parent 9674ada28cfe04a605d093638162c988cae89c9b replaced atoi with strtol, which is more secure diff -r 9674ada28cfe -r 159402d54c29 resize-gd.c --- a/resize-gd.c Wed Jun 25 15:03:00 2008 +0200 +++ b/resize-gd.c Tue Jul 22 10:07:27 2008 +0200 @@ -118,10 +118,10 @@ } /* parse width and height */ - sizeopt.w = atoi(argv[1]); + sizeopt.w = (int) strtol(argv[1], (char**)NULL, 10); c = strchr(argv[1], 'x'); if (c && c[1] != '\0') { - sizeopt.h = atoi(c + 1); + sizeopt.h = (int) strtol(c+1, (char**)NULL, 10); } else { sizeopt.h = -1; /* keep aspect ratio */ }