Bug #68732 [Opn]: Unchecked return value
| From: | rdlowrey@php.net | Date: | Wed, 04 Mar 2015 17:15:41 +0000 |
| Subject: | Bug #68732 [Opn]: Unchecked return value | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-191150@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
Type: Bug
Package: OpenSSL related
Operating System: Linux Ubuntu 14.04
PHP Version: master-Git-2015-01-03 (Git)
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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