mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-08 00:02:03 -04:00
windows: Fix off-by-one error in strerror_s_extended()
This commit is contained in:
parent
0026600bfe
commit
e44223dbcc
@ -362,7 +362,7 @@ int strerror_s_extended(char *buf, size_t buflen, int errnum)
|
||||
};
|
||||
int offset = EADDRINUSE;
|
||||
|
||||
if (errnum < offset || errnum > offset + countof(errstr))
|
||||
if (errnum < offset || errnum >= offset + countof(errstr))
|
||||
{
|
||||
return strerror_s(buf, buflen, errnum);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user