Skip to content

Commit 70c5e36

Browse files
authored
Revert fix for GH-14930: truncating readdir output (#15533)
1 parent d5b5e61 commit 70c5e36

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ PHP NEWS
8181
. Fixed bug GH-15028 (Memory leak in ext/phar/stream.c). (nielsdos)
8282
. Fixed bug GH-15034 (Integer overflow on stream_notification_callback
8383
byte_max parameter with files bigger than 2GB). (nielsdos)
84+
. Reverted fix for GH-14930 (Custom stream wrapper dir_readdir output
85+
truncated to 255 characters). (Jakub Zelenka)
8486

8587
- Tidy:
8688
. Fix memory leaks in ext/tidy basedir restriction code. (nielsdos)

ext/standard/tests/streams/gh14930.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--TEST--
22
GH-14930: Custom stream wrapper dir_readdir output truncated to 255 characters in PHP 8.3
3+
--XFAIL--
4+
Fix is an ABI break so reverted from 8.3
35
--FILE--
46
<?php
57

main/php_streams.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ typedef struct _php_stream_statbuf {
107107
} php_stream_statbuf;
108108

109109
typedef struct _php_stream_dirent {
110+
#ifdef NAME_MAX
111+
char d_name[NAME_MAX + 1];
112+
#else
110113
char d_name[MAXPATHLEN];
114+
#endif
111115
unsigned char d_type;
112116
} php_stream_dirent;
113117

0 commit comments

Comments
 (0)