| commit | eed6782cbb4651876e3c8b27ea53273f230ee8e2 | [log] [tgz] |
|---|---|---|
| author | Bruno Haible <bruno@clisp.org> | Sat Oct 05 02:24:01 2024 +0200 |
| committer | Bruno Haible <bruno@clisp.org> | Sat Oct 05 02:26:56 2024 +0200 |
| tree | 32dbefc809fa587dae518e197017a1a302bf2319 | |
| parent | 78eea6d4df149c01afd49256545191a8f0fe7a8e [diff] |
Fix undefined behaviour caused by shifting (unsigned char) << 24. Reported by Tim Sweet <tsweet64@protonmail.com> at <https://savannah.gnu.org/bugs/?66289>. * lib/ucs4.h (ucs4_mbtowc): Cast 'unsigned char' values to ucs4_t before shifting them to the left. * lib/ucs4be.h (ucs4be_mbtowc): Likewise. * lib/ucs4le.h (ucs4le_mbtowc): Likewise. * lib/utf32.h (utf32_mbtowc): Likewise. * lib/utf32be.h (utf32be_mbtowc): Likewise. * lib/utf32le.h (utf32le_mbtowc): Likewise.