]> git.cameronkatri.com Git - pw-darwin.git/commitdiff
Fix err pointer not initialized to NULL resulting
authorBaptiste Daroussin <bapt@FreeBSD.org>
Fri, 21 Aug 2015 14:28:14 +0000 (14:28 +0000)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Fri, 21 Aug 2015 14:28:14 +0000 (14:28 +0000)
Reported by: "O. Hartmann" <ohartman@zedat.fu-berlin.de>

pw/strtounum.c

index be572764b60c7e7ebb2573689be2ffb774db6945..b2fefebde39295dbc7c298f87d85d1bb8cda2560 100644 (file)
@@ -41,6 +41,7 @@ strtounum(const char * __restrict np, uintmax_t minval, uintmax_t maxval,
        char *endp;
        uintmax_t ret;
 
+       *errpp = NULL;
        if (minval > maxval) {
                errno = EINVAL;
                if (errpp != NULL)