[php-src] PR #15988: Cast big endian byte shuffling to uint
| From: | NattyNarwhal | Date: | Sun, 22 Sep 2024 18:32:28 +0000 |
| Subject: | [php-src] PR #15988: Cast big endian byte shuffling to uint | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-28706@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/15988
Author: NattyNarwhal
This works, but UBSan running on a big endian platform (in this, ppc64) will complain that the
((uchar*)buffer)[n] is int, and shifting that could be weird. Since the value of PHAR_GET_32 et al
are almost always unsigned, it makes sense to cast these as unsigned.
Fixes phar tests on a big endian system with UBSan enabled.