Bug #74556 [Com]: stream_socket_get_name returns \0 string instead of false
| From: | cpuidle at gmx dot de | Date: | Sat, 07 Oct 2017 14:22:00 +0000 |
| Subject: | Bug #74556 [Com]: stream_socket_get_name returns \0 string instead of false | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211575@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74556&edit=1
ID: 74556
Comment by: cpuidle at gmx dot de
Reported by: cpuidle at gmx dot de
Summary: stream_socket_get_name returns \0 string instead of
false
Status: Closed
Type: Bug
Package: Streams related
Operating System: macOS
PHP Version: 7.1.7
Assigned To: pollita
Block user comment: N
Private report: N
New Comment:
@kelunik was faster than me and @pollita ever faster at fixing.
Much appreciated, thank you :)
Previous Comments:
------------------------------------------------------------------------
[2017-10-07 14:16:33] pollita@php.net
=============
ATTENTION!!!!
=============
THIS BUG HAS BEEN FIXED (we hope).
PLEASE REFERENCE THE ABOVE LINK TO GIT.PHP.NET FOR DETAILS ABOUT THE FIX.
=============
ATTENTION!!!!
=============
------------------------------------------------------------------------
[2017-10-07 14:15:04] pollita@php.net
Automatic comment on behalf of pollita
Revision: http://git.php.net/?p=php-src.git;a=commit;h=843e492c6816fa18eff83a7a3e8c370531796912
Log: Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS
------------------------------------------------------------------------
[2017-10-07 14:05:27] pollita@php.net
Yep. I just got done making a better repro and it looks like MacOS is just ever so slightly posix
non-compliant here. The spec still says any leading null byte should be considered abstract though,
so I'll just check the check from len==0 to len==0 || *val=0 and should be gtg.
------------------------------------------------------------------------
[2017-10-07 13:51:39] kelunik@php.net
It's still buggy on macOS, confirmed by bwoebi with yesterday's master.
Output
------
bool(false)
string(15) ""
------------------------------------------------------------------------
[2017-10-07 13:27:45] pollita@php.net
3v4l disagrees with you: https://3v4l.org/VStV6
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=74556
--
Edit this bug report at https://bugs.php.net/bug.php?id=74556&edit=1