Module Name: src Committed By: christos Date: Tue Mar 10 12:57:56 UTC 2015
Modified Files: src/lib/libc/stdlib: strtonum.c Log Message: The OpenBSD strtonum() only accepts base 10 keywords. (Kamil Rytarowski) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/stdlib/strtonum.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/stdlib/strtonum.c diff -u src/lib/libc/stdlib/strtonum.c:1.3 src/lib/libc/stdlib/strtonum.c:1.4 --- src/lib/libc/stdlib/strtonum.c:1.3 Thu Feb 5 11:01:38 2015 +++ src/lib/libc/stdlib/strtonum.c Tue Mar 10 08:57:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strtonum.c,v 1.3 2015/02/05 16:01:38 christos Exp $ */ +/* $NetBSD: strtonum.c,v 1.4 2015/03/10 12:57:56 christos Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: strtonum.c,v 1.3 2015/02/05 16:01:38 christos Exp $"); +__RCSID("$NetBSD: strtonum.c,v 1.4 2015/03/10 12:57:56 christos Exp $"); #define _OPENBSD_SOURCE #include <stdio.h> @@ -48,7 +48,7 @@ strtonum(const char *nptr, long long min if (errstr == NULL) errstr = &resp; - rv = (long long)strtoi(nptr, NULL, 0, minval, maxval, &e); + rv = (long long)strtoi(nptr, NULL, 10, minval, maxval, &e); if (e == 0) { *errstr = NULL;