Skip to content

Commit a230b5a

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #79497: Fix php_openssl_subtract_timeval()
2 parents b2376be + 94e09bf commit a230b5a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ PHP NEWS
1919
. Fixed bug #79441 (Segfault in mb_chr() if internal encoding is unsupported).
2020
(Girgias)
2121

22+
- OpenSSL:
23+
. Fixed bug #79497 (stream_socket_client() throws an unknown error sometimes
24+
with <1s timeout). (Joe Cai)
25+
2226
- SPL:
2327
. Fixed bug #69264 (__debugInfo() ignored while extending SPL classes). (cmb)
2428

ext/openssl/xp_ssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,8 +2253,8 @@ static struct timeval php_openssl_subtract_timeval(struct timeval a, struct time
22532253
difference.tv_usec = a.tv_usec - b.tv_usec;
22542254

22552255
if (a.tv_usec < b.tv_usec) {
2256-
b.tv_sec -= 1L;
2257-
b.tv_usec += 1000000L;
2256+
difference.tv_sec -= 1L;
2257+
difference.tv_usec += 1000000L;
22582258
}
22592259

22602260
return difference;

0 commit comments

Comments
 (0)