Skip to content

Commit 5daf080

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: [ci skip] NEWS Fix shift out of bounds on 32-bit non-fast-path platforms (#10941)
2 parents 1fb3836 + dfbad9f commit 5daf080

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ PHP NEWS
1010
. Fixed bug GH-13563 (Setting bool values via env in FPM config fails).
1111
(Jakub Zelenka)
1212

13+
- MySQLnd:
14+
. Fix shift out of bounds on 32-bit non-fast-path platforms. (nielsdos)
15+
1316
- Opcache:
1417
. Fixed bug GH-13433 (Segmentation Fault in zend_class_init_statics when
1518
using opcache.preload). (nielsdos)

ext/mysqlnd/mysqlnd_portability.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ typedef union {
215215
*(((char *)(T))+1) = (char)(((A) >> 8));\
216216
*(((char *)(T))+2) = (char)(((A) >> 16));\
217217
*(((char *)(T))+3) = (char)(((A) >> 24)); \
218-
*(((char *)(T))+4) = (char)(((A) >> 32)); } while (0)
219-
#define int8store(T,A) { uint32_t def_temp= (uint32_t) (A), def_temp2= (uint32_t) ((A) >> 32); \
218+
*(((char *)(T))+4) = sizeof(A) == 4 ? 0 : (char)(((A) >> 32)); } while (0)
219+
#define int8store(T,A) { uint32_t def_temp= (uint32_t) (A), def_temp2= sizeof(A) == 4 ? 0 : (uint32_t) ((A) >> 32); \
220220
int4store((T),def_temp); \
221221
int4store((T+4),def_temp2); \
222222
}

0 commit comments

Comments
 (0)