php.net |  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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: melchers at cis dot fu-berlin dot de
New email:
PHP Version: OS:

 

 [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;
        SOCK_FIND_AND_READ_MAX(size);
        
        if(size < 0) return ret;
                ^

irix defines these types:
typedef unsigned int size_t;
typedef int    ssize_t;
or
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-16 08:24 UTC] sander@php.net
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 http://www.php.net/downloads.php

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC