Bug 85820 - ext/sockets.c has a bug in socket_write
Summary: ext/sockets.c has a bug in socket_write
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: php
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-03-08 07:05 UTC by Chris Chabot
Modified: 2007-04-18 16:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-07-03 11:46:47 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2003:204 0 normal SHIPPED_LIVE : Updated PHP packages are now available 2003-07-02 04:00:00 UTC

Description Chris Chabot 2003-03-08 07:05:37 UTC
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

--- 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,
-   if (ZEND_NUM_ARGS() < 4) { 
+   if (ZEND_NUM_ARGS() < 3) { 
        length = str_len;

Comment 1 Chris Chabot 2003-06-11 04:55:06 UTC
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 11:46:47 UTC
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.


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