Bug #68732 [Opn->Ana]: Unchecked return value

From: Date: Wed, 04 Mar 2015 17:18:06 +0000
Subject: Bug #68732 [Opn->Ana]: Unchecked return value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191151@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68732&edit=1

 ID:                 68732
 Updated by:         rdlowrey@php.net
 Reported by:        bugreports at internot dot info
 Summary:            Unchecked return value
-Status:             Open
+Status:             Analyzed
 Type:               Bug
 Package:            OpenSSL related
 Operating System:   Linux Ubuntu 14.04
 PHP Version:        master-Git-2015-01-03 (Git)
-Assigned To:        
+Assigned To:        rdlowrey
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2015-03-04 17:15:40] rdlowrey@php.net

In this case the return value from php_pollfd_for has no bearing on the remainder of the operation.
It simply tells us whether or not there is readable data available on the the underlying socket
descriptor. This isn't really a bug ... but yes ... we can make the code more efficient by
checking the return value and avoiding another trip around the loop (I'm looking at the current
master branch -- not the version from 2015-01-03).

Thanks for the report. I'll clean this up sooner rather than later and report back.

------------------------------------------------------------------------
[2015-01-03 03:51:44] bugreports at internot dot info

Description:
------------
Hi,

In /ext/openssl/xp_ssl.c:

1682                                        php_pollfd_for(sslsock->s.socket, (err ==
SSL_ERROR_WANT_READ) ?
1683                                                (POLLIN|POLLPRI) : POLLOUT, has_timeout ?
&left_time : NULL);

But this result is never checked.

Everywhere else php_pollfd_for is used, the return result is checked. And it should be here too.



Thanks,



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68732&edit=1


Thread (5 messages)

« previous php.bugs (#191151) next »