Bug 85820 - ext/sockets.c has a bug in socket_write
ext/sockets.c has a bug in socket_write
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
9
All Linux
medium Severity high
: ---
: ---
Assigned To: Joe Orton
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-08 02:05 EST by Chris Chabot
Modified: 2007-04-18 12:51 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-07-03 07:46:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Chabot 2003-03-08 02:05:37 EST
sockets.c has a bug in the param count which causes the length param to be
ignored, below is the patch that fixes it for php-4.2.3 (but the same is present
in 4.2.2). I have reported this bug upstream where they fixed it in the newer
releases (4.3.x) but redhat uses an older version, so every redhat box is still
affected. Can this patch still make it into redhat 8.1? (it's seriously
bothersome to ask every client of mine to run a custom build php because of this
bug)

--- ext/sockets.org/sockets.c   2003-03-07 06:45:07.000000000 +0100 
+++ ext/sockets/sockets.c   2003-03-07 06:45:19.000000000 +0100 
@@ -690,7 +690,7 @@
 
    ZEND_FETCH_RESOURCE(php_sock, php_socket *, &arg1, -1, le_socket_name,
le_socket);
 
-   if (ZEND_NUM_ARGS() < 4) { 
+   if (ZEND_NUM_ARGS() < 3) { 
        length = str_len;
    }
Comment 1 Chris Chabot 2003-06-11 00:55:06 EDT
Same bug was still present in red hat 9, however it seems that rawhide is going
the php 4.3.x way. 

I reported this bug to the php dev's and the fix is present in the 4.2.3 and
4.3.x versions, so if redhat will update to those versions, no action is needed.

Is a shame this report was ignored, and a simple patch never made it to new rh
releases or erate ;-/
Comment 2 Joe Orton 2003-07-03 07:46:47 EDT
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2003-204.html

Note You need to log in before you can comment on or make changes to this bug.