]> granicus.if.org Git - php/commitdiff
Fix condition
authorAnatol Belski <ab@php.net>
Wed, 11 Jul 2018 11:09:20 +0000 (13:09 +0200)
committerAnatol Belski <ab@php.net>
Wed, 11 Jul 2018 11:09:20 +0000 (13:09 +0200)
It looks like the real length limit is 247 bytes, not 248 as documented.

win32/ioutil.c

index b9131dc759dcf71d2822cf940c55660a43fadbe8..d9c19564fb497e131aba372e2934d115667ac54f 100644 (file)
@@ -311,7 +311,7 @@ PW32IO int php_win32_ioutil_mkdir(const char *path, mode_t mode)
        int ret = 0;
        DWORD err = 0;
 
-       if (pathw_len < _MAX_PATH && pathw_len > _MAX_PATH - 12) {
+       if (pathw_len < _MAX_PATH && pathw_len >= _MAX_PATH - 12) {
                /* Special case here. From the doc:
 
                 "When using an API to create a directory, the specified path cannot be