x509_crt: Adjusted the len of lpMultiByteStr arg in WideCharToMultiByte

Signed-off-by: Minos Galanakis <[email protected]>
This commit is contained in:
Minos Galanakis
2023-09-25 14:12:23 +01:00
parent 08a67ccefd
commit 59108d3f4d
+1 -2
View File
@@ -1585,8 +1585,7 @@ int mbedtls_x509_crt_parse_path(mbedtls_x509_crt *chain, const char *path)
continue;
}
w_ret = WideCharToMultiByte(CP_ACP, 0, file_data.cFileName,
-1, p, (int) len - 1,
NULL, NULL);
-1, p, (int) len, NULL, NULL);
if (w_ret == 0) {
ret = MBEDTLS_ERR_X509_FILE_IO_ERROR;
goto cleanup;