forked from wolfSSL/wolfssl
Fixes "warning: Size argument is greater than the free space in the destination buffer" with XSTRNCAT().
This commit is contained in:
@@ -1185,10 +1185,10 @@ static INLINE int OpenNitroxDevice(int dma_mode,int dev_id)
|
|||||||
return depth;
|
return depth;
|
||||||
}
|
}
|
||||||
#ifdef USE_WINDOWS_API
|
#ifdef USE_WINDOWS_API
|
||||||
XSTRNCAT(path, "..\\", MAX_PATH);
|
XSTRNCAT(path, "..\\", MAX_PATH - XSTRLEN(path));
|
||||||
SetCurrentDirectoryA(path);
|
SetCurrentDirectoryA(path);
|
||||||
#else
|
#else
|
||||||
XSTRNCAT(path, "../", MAX_PATH);
|
XSTRNCAT(path, "../", MAX_PATH - XSTRLEN(path));
|
||||||
if (chdir(path) < 0) {
|
if (chdir(path) < 0) {
|
||||||
printf("chdir to %s failed\n", path);
|
printf("chdir to %s failed\n", path);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user