[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

bernd.edlinger at hotmail.de bernd.edlinger at hotmail.de
Tue Apr 3 14:08:04 UTC 2018


The branch OpenSSL_1_1_0-stable has been updated
       via  e12e3549b79602cdfa888baa23907a8c1e704bd6 (commit)
      from  47ed1f8161c9888bff10ac26b90845cdff859661 (commit)


- Log -----------------------------------------------------------------
commit e12e3549b79602cdfa888baa23907a8c1e704bd6
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date:   Sun Apr 1 11:02:39 2018 +0200

    Use strtol instead of atoi in asn1parse
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
    (Merged from https://github.com/openssl/openssl/pull/5826)
    
    (cherry picked from commit 18ada952d1dcea8dfc5008df9f317b3eb47c13fa)

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

Summary of changes:
 apps/asn1pars.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/apps/asn1pars.c b/apps/asn1pars.c
index dcd132f..34f987d 100644
--- a/apps/asn1pars.c
+++ b/apps/asn1pars.c
@@ -113,13 +113,13 @@ int asn1parse_main(int argc, char **argv)
             offset = strtol(opt_arg(), NULL, 0);
             break;
         case OPT_LENGTH:
-            length = atoi(opt_arg());
+            length = strtol(opt_arg(), NULL, 0);
             break;
         case OPT_DUMP:
             dump = -1;
             break;
         case OPT_DLIMIT:
-            dump = atoi(opt_arg());
+            dump = strtol(opt_arg(), NULL, 0);
             break;
         case OPT_STRPARSE:
             sk_OPENSSL_STRING_push(osk, opt_arg());
@@ -211,7 +211,7 @@ int asn1parse_main(int argc, char **argv)
         for (i = 0; i < sk_OPENSSL_STRING_num(osk); i++) {
             ASN1_TYPE *atmp;
             int typ;
-            j = atoi(sk_OPENSSL_STRING_value(osk, i));
+            j = strtol(sk_OPENSSL_STRING_value(osk, i), NULL, 0);
             if (j <= 0 || j >= tmplen) {
                 BIO_printf(bio_err, "'%s' is out of range\n",
                            sk_OPENSSL_STRING_value(osk, i));


More information about the openssl-commits mailing list