php-src/win32
Christoph M. Becker 5c76ef78cb
Fix GH-10992: Improper long path support for relative paths
Relative paths are passed to the ioutils APIs, these are not properly
converted to long paths.  If the path length already exceeds a given
threshold (usually 259 characters, but only 247 for `mkdir()`), the
long path prefix is prepended, resulting in an invalid path, since long
paths have to be absolute.  If the path length does not exceed that
threshold, no conversion to a long path is done, although that may be
necessary.

Thus we take the path length of the current working directory into
account when checking the threshold, and prepend it to the filename if
necessary.

Since this is only relevant for NTS builds, and using the current
working directory of the process would be erroneous for ZTS builds, we
skip the new code for ZTS builds.

Closes GH-16687.
2024-11-07 13:34:41 +01:00
..
build Don't fiddle with NDEBUG in C code (GH-16511) 2024-10-27 18:20:59 +01:00
codepage.c Port win32/codepage.c codes for windows arm64 2022-07-21 14:02:25 +02:00
codepage.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
console.c Fixed some spaces used instead of tabs 2021-06-29 11:30:26 +02:00
console.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
cp_enc_map_gen.c Remove local variables 2019-02-03 21:03:00 +01:00
cp_enc_map.c Trailing whitespaces 2018-01-03 14:38:00 +01:00
dllmain.c win32/dllmain.c: drop some unused code (#16353) 2024-10-13 11:24:22 +01:00
fnmatch.c Remove local variables 2019-02-03 21:03:00 +01:00
fnmatch.h Remove local variables 2019-02-03 21:03:00 +01:00
ftok.c Avoid undefined behavior in Windows ftok(3) emulation 2022-11-18 14:37:00 +01:00
getrusage.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
getrusage.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
glob.c Drop remaining usage of u_char in favour of standard C99 uint8_t (#8611) 2022-05-23 21:57:31 +01:00
glob.h Remove local variables 2019-02-03 21:03:00 +01:00
globals.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
ioutil.c Fix GH-10992: Improper long path support for relative paths 2024-11-07 13:34:41 +01:00
ioutil.h Fix GH-10992: Improper long path support for relative paths 2024-11-07 13:34:41 +01:00
ipc.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
nice.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
nice.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
param.h Remove local variables 2019-02-03 21:03:00 +01:00
php_registry.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_win32_globals.h Autotools: Refactor thread safety checks (#15214) 2024-08-05 22:30:10 +02:00
readdir.c Cache d_type in directory entry 2023-07-07 18:02:32 +02:00
readdir.h Cache d_type in directory entry 2023-07-07 18:02:32 +02:00
registry.c Use more compact representation for packed arrays. 2021-11-03 15:18:26 +03:00
select.c Zend/zend_types.h: deprecate zend_bool, zend_intptr_t, zend_uintptr_t (#10597) 2023-02-18 19:31:28 +00:00
select.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
sendmail.c Fix comments in win32/sendmail.c (GH-15326) 2024-08-10 13:59:06 +02:00
sendmail.h Constify char * arguments of APIs 2020-06-08 10:38:45 +02:00
signal.c Sync #if/ifdef/defined (-Wundef) (#14623) 2024-06-24 19:37:07 +02:00
signal.h Fix TS build, ref #77377 2019-02-08 18:42:48 -08:00
sockets.c Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
sockets.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
syslog.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
time.c Voidify getfilesystemtime() (GH-15413) 2024-08-14 21:09:26 +02:00
time.h Remove php_win32_init_gettimeofday declaration (#15451) 2024-08-17 13:58:40 +02:00
unistd.h Remove local variables 2019-02-03 21:03:00 +01:00
winutil.c Fix potentially erroneous php_win32_crt_compatible() (GH-16374) 2024-10-12 16:00:15 +02:00
winutil.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
wsyslog.c Merge branch 'PHP-7.3' into PHP-7.4 2019-07-11 13:11:08 +02:00