Skip to content

Commit e08a5dc

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)