[openssl-commits] [openssl] master update

Viktor Dukhovni viktor at openssl.org
Sun Apr 3 19:36:41 UTC 2016


The branch master has been updated
       via  c3a7e0c565c5d41e7d9b910a45c2248c2f3d5152 (commit)
      from  bb3bdf0507ac5c9713a7e99d8652085b2f150b06 (commit)


- Log -----------------------------------------------------------------
commit c3a7e0c565c5d41e7d9b910a45c2248c2f3d5152
Author: Viktor Dukhovni <openssl-users at dukhovni.org>
Date:   Sun Apr 3 15:21:34 2016 -0400

    After saving errno clear it before calls to strtol et. al.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 apps/opt.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/apps/opt.c b/apps/opt.c
index 462894a..63d3215 100644
--- a/apps/opt.c
+++ b/apps/opt.c
@@ -373,6 +373,7 @@ int opt_long(const char *value, long *result)
     long l;
     char *endp;
 
+    errno = 0;
     l = strtol(value, &endp, 0);
     if (*endp
             || endp == value
@@ -398,6 +399,7 @@ int opt_imax(const char *value, intmax_t *result)
     intmax_t m;
     char *endp;
 
+    errno = 0;
     m = strtoimax(value, &endp, 0);
     if (*endp
             || endp == value
@@ -420,6 +422,7 @@ int opt_umax(const char *value, uintmax_t *result)
     uintmax_t m;
     char *endp;
 
+    errno = 0;
     m = strtoumax(value, &endp, 0);
     if (*endp
             || endp == value
@@ -445,6 +448,7 @@ int opt_ulong(const char *value, unsigned long *result)
     char *endptr;
     unsigned long l;
 
+    errno = 0;
     l = strtoul(value, &endptr, 0);
     if (*endptr
             || endptr == value


More information about the openssl-commits mailing list