diff --git a/src/common/impl/path.c b/src/common/impl/path.c index 03662502c..97dc9993a 100644 --- a/src/common/impl/path.c +++ b/src/common/impl/path.c @@ -128,13 +128,6 @@ char* frealpath(HANDLE hFile, char* resolved_name) { errno = E2BIG; return NULL; } - - if (outBytes > MAX_PATH) { - errno = E2BIG; - return NULL; - } - - return resolved_name; } else { /* UTF-8 worst-case: up to 4 bytes per UTF-16 code unit */ char tmp[(MAX_PATH + 4) * 4]; @@ -152,7 +145,6 @@ char* frealpath(HANDLE hFile, char* resolved_name) { } memcpy(resolved_name, tmp, outBytes); - return resolved_name; } return resolved_name;