php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21588 socket_bind() with invalid address crashes php.exe
Submitted: 2003-01-11 15:49 UTC Modified: 2003-02-20 08:01 UTC
From: ptchristendom at yahoo dot com Assigned:
Status: No Feedback Package: Sockets related
PHP Version: 4.3.0 OS: WinNT 4.0 SP 6
Private report: No CVE-ID: None
 [2003-01-11 15:49 UTC] ptchristendom at yahoo dot com
Any call to socket_bind() which would fail will cause php.exe to crash:

Exception: access violation (0xc0000005), Address 0x10011b1b

Sample:

<?
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$socket2 = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_bind($socket, "127.0.0.1", 5799);
socket_bind($socket2, "127.0.0.1", 5799);
?>

OR

<?
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_bind($socket, '1.1.1.1', 4567);
?>

I used the windows build available from www.php.net, and I also used the php-ini.recommended, except that I uncommented the lines to load the modules php_bz2.dll, php_sockets.dll, php_zip.dll.

NOTE: In retrospect, this may be the same bug as #21585

http://bugs.php.net/21585

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-13 19:40 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

It doesn't crash for me..

 [2003-02-20 08:01 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC