|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6942 php sockets unusable with irix-OS
Submitted: 2000-09-29 16:49 UTC Modified: 2002-06-16 08:24 UTC
From: melchers at cis dot fu-berlin dot de Assigned:
Status: Not a bug Package: Compile Warning
PHP Version: 3.0.16 OS: IRIX-6.5.8
Private report: No CVE-ID: None
 [2000-09-29 16:49 UTC] melchers at cis dot fu-berlin dot de
(using php-3.0.17RC1)
file functions/fsock.c line 677:

cc: WARNING File = functions/fsock.c, Line = 677
  An unsigned integer is being compared to zero.

size_t _php3_sock_fread(char *ptr, size_t size, int socket)
        size_t ret = 0;
        if(size < 0) return ret;

irix defines these types:
typedef unsigned int size_t;
typedef int    ssize_t;
typedef unsigned long size_t;
typedef long    ssize_t;
(dependent of 32/64 bit interface)
In both cases size_t is unsigned.
Therefore the function _php3_sock_fread()
returns never 0, if there are no data
at the socket to read. This makes socket
communication unusable with irix.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-16 08:24 UTC]
Thank you for taking the time to report a problem with PHP.
Unfortunately, PHP 3 is no longer supported. Please download
the latest version of PHP 4 from

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Jan 28 14:05:52 2023 UTC