History log of /php-src/ext/ffi/tests/gh10403.phpt (Results 1 – 2 of 2)
Revision Date Author Comments
# f39b5c4c 11-Oct-2023 Ilija Tovilo

Close PHP tags in tests

Closes GH-12422


# 560ca9c7 24-Jan-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix incorrect bitshifting and masking in ffi bitfield (#10403)

When a uint8_t is bitshifted to the left, it is actually promoted to an
int. For the current code this has the effect of a

Fix incorrect bitshifting and masking in ffi bitfield (#10403)

When a uint8_t is bitshifted to the left, it is actually promoted to an
int. For the current code this has the effect of a wrong sign-extension,
and the result will also wrongly become zero when insert_pos >= 32.
Fix this by adding an explicit cast.
Furthermore, the partial prefix byte mask was computed incorrectly: the
byte is already shifted so the mask should not account for the shift.

show more ...