]> git.ipfire.org Git - thirdparty/gettext.git/commit
xgettext: Make literal parser robust against NUL
authorDaiki Ueno <ueno@gnu.org>
Thu, 25 Jun 2015 02:37:39 +0000 (11:37 +0900)
committerDaiki Ueno <ueno@gnu.org>
Thu, 25 Jun 2015 02:37:39 +0000 (11:37 +0900)
commit4dd7d3dbcb2ec6ceae3a65d405751729fd26e1e1
tree17511b622bb94ebcc6dc680becddfc0643a20dbb
parent54f28c3850567d980943ac260638eccc42b0831b
xgettext: Make literal parser robust against NUL

* gettext-tools/src/x-c.c (literalstring_parse): Add more NUL checks.
Change the loop invariant so that C always points to the character
previously pointed by P.
Reported by Hanno Boeck in:
<http://savannah.gnu.org/bugs/?45391>.

* gettext-tools/tests/xg-c-21.c (main): New file.
* gettext-tools/tests/xgettext-c-21 (result): New file.
* gettext-tools/tests/Makefile.am (TESTS): Add new test.
(EXTRA_DIST): Add xg-c-21.c.
gettext-tools/src/ChangeLog
gettext-tools/src/x-c.c
gettext-tools/tests/Makefile.am
gettext-tools/tests/xg-c-21.c [new file with mode: 0644]
gettext-tools/tests/xgettext-c-21 [new file with mode: 0755]