Skip to content

Revert fix for GH-14930: truncating readdir output #15533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ PHP NEWS
. Fixed bug GH-15028 (Memory leak in ext/phar/stream.c). (nielsdos)
. Fixed bug GH-15034 (Integer overflow on stream_notification_callback
byte_max parameter with files bigger than 2GB). (nielsdos)
. Reverted fix for GH-14930 (Custom stream wrapper dir_readdir output
truncated to 255 characters). (Jakub Zelenka)

- Tidy:
. Fix memory leaks in ext/tidy basedir restriction code. (nielsdos)
Expand Down
2 changes: 2 additions & 0 deletions ext/standard/tests/streams/gh14930.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
GH-14930: Custom stream wrapper dir_readdir output truncated to 255 characters in PHP 8.3
--XFAIL--
Fix is an ABI break so reverted from 8.3
--FILE--
<?php

Expand Down
4 changes: 4 additions & 0 deletions main/php_streams.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ typedef struct _php_stream_statbuf {
} php_stream_statbuf;

typedef struct _php_stream_dirent {
#ifdef NAME_MAX
char d_name[NAME_MAX + 1];
#else
char d_name[MAXPATHLEN];
#endif
unsigned char d_type;
} php_stream_dirent;

Expand Down
Loading