1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/win32/ftok.c
Christoph M. Becker 2d94ee5f20 Avoid undefined behavior in Windows ftok(3) emulation
`.nFileIndexHigh` is a unsigned 32bit number.  Casting that to `__int64`
and shifting left by 32bits triggers undefined behavior if the most
significant bit of `.nFileIndexHigh` is set.  We could avoid that by
casting to `(__uint64)`, but in that case the whole clause doesn't have
an effect anymore, so we drop it altogether.

Closes GH-9958.
2022-11-18 14:37:00 +01:00

1.8 KiB