MINGW-packages/mingw-w64-libnfs/2.0.0-win32.patch
2022-08-20 20:45:23 +01:00

12 lines
339 B
Diff

--- a/win32/win32_compat.c
+++ b/win32/win32_compat.c
@@ -58,7 +58,7 @@
#else
char *srcNonConst = (char *)malloc(strLen);
memset(srcNonConst, 0, strLen);
- strncpy(srcNonConst, src, strLen);
+ strncpy(srcNonConst, src, sizeof(srcNonConst) - 1);
#endif
if( WSAStringToAddress(srcNonConst,af,NULL,(LPSOCKADDR)&sa,&len) == 0 )