php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68732 Unchecked return value
Submitted: 2015-01-03 03:51 UTC Modified: 2017-10-24 06:20 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: bugreports at internot dot info Assigned:
Status: Open Package: OpenSSL related
PHP Version: master-Git-2015-01-03 (Git) OS: Linux Ubuntu 14.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bugreports at internot dot info
New email:
PHP Version: OS:

 

 [2015-01-03 03:51 UTC] 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,


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-04 17:15 UTC] 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-03-04 17:18 UTC] rdlowrey@php.net
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: rdlowrey
 [2017-10-24 05:15 UTC] kalle@php.net
-Status: Analyzed +Status: Assigned
 [2017-10-24 06:20 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: rdlowrey +Assigned To:
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Dec 08 02:01:25 2019 UTC