diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-07-07 08:55:26 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-07-07 08:55:26 +0200 |
commit | 9f412e995b898b6d75f343212f6a4b3ba399d9f5 (patch) | |
tree | c9948bc0aa5c8de9c32a353b426ac6c4edf3af18 /openssl/agent/pkcs11/url.cxx | |
parent | 20e15fb0a6ecb043a7c5b9ae94eddf0e6cb3d53a (diff) |
Clear errno before calling strto*() functions
Diffstat (limited to 'openssl/agent/pkcs11/url.cxx')
-rw-r--r-- | openssl/agent/pkcs11/url.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openssl/agent/pkcs11/url.cxx b/openssl/agent/pkcs11/url.cxx index 5bed7b0..0c946d9 100644 --- a/openssl/agent/pkcs11/url.cxx +++ b/openssl/agent/pkcs11/url.cxx @@ -27,6 +27,7 @@ namespace openssl { const char* b (s.c_str ()); char* e (nullptr); + errno = 0; // We must clear it according to POSIX. uint64_t v (strtoull (b, &e, 10)); // Can't throw. if (errno != ERANGE && e == b + s.size () && v >= min && v <= max) |