|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-01-09 08:31 UTC] laruence@php.net
[2017-01-09 08:31 UTC] laruence@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 31 23:00:01 2025 UTC |
Description: ------------ Commit bbfd4a5e62c offers to "fix crypto stream timeout regressions". It introduces the following code snippet in php_openssl_sockop_io function: /* never use a timeout with non-blocking sockets */ if (began_blocked && &sslsock->s.timeout) { timeout = &sslsock->s.timeout; } (currently in ext/openssl/xp_ssl.c around line 1910) This condition will be always true, as this syntax means "take the address of sslsock->s.timeout". This is caught by clang/llvm compiler: /home/dereckson/dev/php/php-src/ext/openssl/xp_ssl.c:1908:36: warning: address of 'sslsock->s.timeout' will always evaluate to 'true' [-Wpointer-bool-conversion] if (began_blocked && &sslsock->s.timeout) { ~~ ~~~~~~~~~~~^~~~~~~ 1 warning generated. Expected result: ---------------- To get the timeout value Actual result: -------------- Always true, as it gets the address