http-api: Fix canonical pathname calculation on Windows

This commit is contained in:
Roger Light
2026-01-12 20:39:55 +00:00
parent 02eee2a606
commit 144d1fd86b

View File

@@ -99,7 +99,7 @@ static char *http__canonical_filename(
return NULL;
}
#ifdef WIN32
char *resolved = _fullpath(filename_canonical, filename, 0);
char *resolved = _fullpath(filename_canonical, filename, PATH_MAX);
mosquitto_FREE(filename);
if(!resolved){
*error_code = MHD_HTTP_INTERNAL_SERVER_ERROR;