]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: C: Fix undefined behaviour.
authorBruno Haible <bruno@clisp.org>
Tue, 10 Sep 2024 01:58:05 +0000 (03:58 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 10 Sep 2024 01:59:08 +0000 (03:59 +0200)
commitdb30cffd7d17f80b733073174c396bdee25f5bff
treee1e4f9faff59bae03ebbd7cd48bfcdfc104ef01e
parent04af1c4cda5f02dee8f95b6befd46e6fd89726bb
xgettext: C: Fix undefined behaviour.

* gettext-tools/src/x-c.c (phase7_getc): Declare n as 'unsigned int', to avoid
signed integer overflow.
* gettext-tools/tests/xg-c-escape-3.c: Add two more test cases.
* gettext-tools/tests/xgettext-c-escape-3: Update expected test result.
gettext-tools/src/x-c.c
gettext-tools/tests/xg-c-escape-3.c
gettext-tools/tests/xgettext-c-escape-3