We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 09075fb + 6088d50 commit da6cc62Copy full SHA for da6cc62
compat/mingw.c
@@ -1257,8 +1257,11 @@ char *mingw_mktemp(char *template)
1257
int offset = 0;
1258
1259
/* we need to return the path, thus no long paths here! */
1260
- if (xutftowcs_path(wtemplate, template) < 0)
+ if (xutftowcsn(wtemplate, template, MAX_PATH, -1) < 0) {
1261
+ if (errno == ERANGE)
1262
+ errno = ENAMETOOLONG;
1263
return NULL;
1264
+ }
1265
1266
if (is_dir_sep(template[0]) && !is_dir_sep(template[1]) &&
1267
iswalpha(wtemplate[0]) && wtemplate[1] == L':') {
0 commit comments