fix hostkey tests

This commit is contained in:
Tess Gauthier 2023-08-28 14:51:40 -04:00
parent 22615453ef
commit a6229b9e7b
1 changed files with 2 additions and 2 deletions

View File

@ -291,7 +291,7 @@ error:
}
/*fopen on Windows to mimic https://linux.die.net/man/3/fopen
* only r, w, a are supported for now
* only r, w, a, a+ are supported for now
*/
FILE *
w32_fopen_utf8(const char *input_path, const char *mode)
@ -304,7 +304,7 @@ w32_fopen_utf8(const char *input_path, const char *mode)
errno_t r = 0;
int nonfs_dev = 0; /* opening a non file system device */
if (mode == NULL || mode[1] != '\0') {
if (mode == NULL || (mode[1] != '\0' && strncmp(mode, "a+", 2) != 0)) {
errno = ENOTSUP;
return NULL;
}