Skip to content

Commit

Permalink
fixup: don't bother modifying paths less than MAX_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
jay committed May 3, 2024
1 parent f7e60b5 commit 19f5588
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/curl_multibyte.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ static bool fix_excessive_path(const TCHAR *in, TCHAR **out)
needed = (size_t)GetFullPathNameW(in_w, 0, NULL, NULL);
if(!needed || needed > (32767 - 4))
goto error;
/* ignore paths which are not excessive and don't need modification */
if(needed < MAX_PATH)
goto error;
fbuf = malloc((needed + 4)* sizeof(wchar_t));
if(!fbuf)
goto error;
Expand Down

0 comments on commit 19f5588

Please sign in to comment.