Skip to content

Commit a2e4404

Browse files
committed
Fixed bug #63241 PHP fails to open Windows deduplicated files.
Fix by (daniel dot stelter-gliese at innogames dot de). No test is supplied because the issue addresses the new feature of the Windows Server 2012 and would need a very specific filesystem setup.
1 parent a17559d commit a2e4404

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2012, PHP 5.3.19
44

5+
- Core
6+
. Fixed bug #63241 PHP fails to open Windows deduplicated files.
7+
(daniel dot stelter-gliese at innogames dot de)
8+
59
- Libxml
610
. Fixed bug #63389 (Missing context check on libxml_set_streams_context()
711
causes memleak). (Laruence)

TSRM/tsrm_virtual_cwd.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
# define IO_REPARSE_TAG_SYMLINK 0xA000000C
4141
# endif
4242

43+
# ifndef IO_REPARSE_TAG_DEDUP
44+
# define IO_REPARSE_TAG_DEDUP 0x80000013
45+
# endif
46+
4347
# ifndef VOLUME_NAME_NT
4448
# define VOLUME_NAME_NT 0x2
4549
# endif
@@ -958,6 +962,11 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
958962
return -1;
959963
};
960964
substitutename[substitutename_len] = 0;
965+
}
966+
else if (pbuffer->ReparseTag == IO_REPARSE_TAG_DEDUP) {
967+
isabsolute = 1;
968+
memcpy(substitutename, path, len + 1);
969+
substitutename_len = len;
961970
} else {
962971
tsrm_free_alloca(pbuffer, use_heap_large);
963972
return -1;

0 commit comments

Comments
 (0)