Mercurial > resize-gd
changeset 17:159402d54c29 default tip
replaced atoi with strtol, which is more secure
author | meillo@marmaro.de |
---|---|
date | Tue, 22 Jul 2008 10:07:27 +0200 |
parents | 9674ada28cfe |
children | |
files | resize-gd.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 */ }