Bug #68732 [Asn->Opn]: Unchecked return value
Edit report at https://bugs.php.net/bug.php?id=68732&edit=1
ID: 68732
Updated by: kalle@php.net
Reported by: bugreports at internot dot info
Summary: Unchecked return value
-Status: Assigned
+Status: Open
Type: Bug
Package: OpenSSL related
Operating System: Linux Ubuntu 14.04
PHP Version: master-Git-2015-01-03 (Git)
-Assigned To: rdlowrey
+Assigned To:
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)