]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: In language C, report out-of-range hexadecimal escapes.
authorBruno Haible <bruno@clisp.org>
Sat, 11 Mar 2023 00:02:47 +0000 (01:02 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 14 Mar 2023 01:57:28 +0000 (02:57 +0100)
commit0c0345632aedfb254b69f72cce268728113edf2e
treec6e019f7e266bffb4ea938da868b9a3f1f2dbbb1
parent53a2b763b8dc516bd20258ea5aead80bc7ab7cf3
xgettext: In language C, report out-of-range hexadecimal escapes.

This avoids a later crash
"Assertion `UNICODE_VALUE (c) >= 0 && UNICODE_VALUE (c) < 0x110000' failed."

* gettext-tools/src/x-c.c (phase7_getc): When the value of a hexadecimal escape
sequence overflows, warn and use the last value before it overflowed.
* gettext-tools/tests/xgettext-c-7: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
gettext-tools/src/x-c.c
gettext-tools/tests/Makefile.am
gettext-tools/tests/xgettext-c-7 [new file with mode: 0755]