mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
strerror: don't bit shift a signed integer
Bug: https://github.com/curl/curl/issues/744 Reported-by: Alexis La Goutte
This commit is contained in:
parent
213d3c7b0c
commit
7c314fd9f8
@ -1076,14 +1076,13 @@ const char *Curl_sspi_strerror (struct connectdata *conn, int err)
|
|||||||
strncpy(outbuf, txt, outmax);
|
strncpy(outbuf, txt, outmax);
|
||||||
else if(err == SEC_E_ILLEGAL_MESSAGE)
|
else if(err == SEC_E_ILLEGAL_MESSAGE)
|
||||||
snprintf(outbuf, outmax,
|
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). "
|
"when a fatal SSL/TLS alert is received (e.g. handshake failed). "
|
||||||
"More detail may be available in the Windows System event log.",
|
"More detail may be available in the Windows System event log.",
|
||||||
(err >> 16) & 0xffff, err & 0xffff);
|
err);
|
||||||
else {
|
else {
|
||||||
str = txtbuf;
|
str = txtbuf;
|
||||||
snprintf(txtbuf, sizeof(txtbuf), "%s (0x%04X%04X)",
|
snprintf(txtbuf, sizeof(txtbuf), "%s (0x%08X)", txt, err);
|
||||||
txt, (err >> 16) & 0xffff, err & 0xffff);
|
|
||||||
txtbuf[sizeof(txtbuf)-1] = '\0';
|
txtbuf[sizeof(txtbuf)-1] = '\0';
|
||||||
|
|
||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
|
Loading…
Reference in New Issue
Block a user