diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2016-03-31 21:05:29 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2016-03-31 21:05:29 -0400 |
commit | 7c314fd9f8e383c36b700ac231645efe1dfcd1eb (patch) | |
tree | 27109dc23d2f933e99ec65bcd40a866696b342a7 /lib | |
parent | 213d3c7b0c05a1071b93448a56d0661147ce6d50 (diff) |
strerror: don't bit shift a signed integer
Bug: https://github.com/curl/curl/issues/744
Reported-by: Alexis La Goutte
Diffstat (limited to 'lib')
-rw-r--r-- | lib/strerror.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/strerror.c b/lib/strerror.c index d222a1fc0..cf1a04781 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -1076,14 +1076,13 @@ const char *Curl_sspi_strerror (struct connectdata *conn, int err) strncpy(outbuf, txt, outmax); else if(err == SEC_E_ILLEGAL_MESSAGE) snprintf(outbuf, outmax, - "SEC_E_ILLEGAL_MESSAGE (0x%04X%04X) - This error usually occurs " + "SEC_E_ILLEGAL_MESSAGE (0x%08X) - This error usually occurs " "when a fatal SSL/TLS alert is received (e.g. handshake failed). " "More detail may be available in the Windows System event log.", - (err >> 16) & 0xffff, err & 0xffff); + err); else { str = txtbuf; - snprintf(txtbuf, sizeof(txtbuf), "%s (0x%04X%04X)", - txt, (err >> 16) & 0xffff, err & 0xffff); + snprintf(txtbuf, sizeof(txtbuf), "%s (0x%08X)", txt, err); txtbuf[sizeof(txtbuf)-1] = '\0'; #ifdef _WIN32_WCE |