mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
strerror: skip errnum >= 0 assertion on windows
On Windows an error number may be greater than INT_MAX and negative once cast to int. The assertion is checked only in debug builds. Closes https://github.com/curl/curl/pull/6504
This commit is contained in:
parent
b97a60f5f4
commit
d3a3bdb5ef
@ -721,7 +721,9 @@ const char *Curl_strerror(int err, char *buf, size_t buflen)
|
||||
if(!buflen)
|
||||
return NULL;
|
||||
|
||||
#ifndef WIN32
|
||||
DEBUGASSERT(err >= 0);
|
||||
#endif
|
||||
|
||||
max = buflen - 1;
|
||||
*buf = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user