]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_doswin: increase allowable length of path sanitizer
authorJay Satiro <raysatiro@yahoo.com>
Sat, 20 Dec 2025 09:08:09 +0000 (04:08 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Tue, 30 Dec 2025 09:00:50 +0000 (04:00 -0500)
commit1068d048ec85befdaa88b9cb868d4255714aa9cc
tree990ccc35f2c755c3fab6412e251040ec48e1b0fa
parent52ac8104e1396998110e0760ac780f4f2414831f
tool_doswin: increase allowable length of path sanitizer

- Use 32767-1 instead of PATH_MAX-1 (260-1) as the maximum allowable
  length of a path in Windows.

Prior to this change the path sanitizer in Windows used 32767-1 as the
maximum length only for paths that had the "\\" prefix like
"\\?\longpath". Since then we added some workarounds to open longer
paths without "\\?\" prefix by normalizing the path and adding that
prefix, and the sanitizer is called before the prefix is added.

Bug: https://github.com/curl/curl/issues/20044
Reported-by: Viktor Szakats
Closes https://github.com/curl/curl/pull/20046
src/tool_doswin.c
tests/tunit/tool1604.c