]> git.ipfire.org Git - thirdparty/gettext.git/commit
msgunfmt: Detect more cases of invalid .mo files.
authorBruno Haible <bruno@clisp.org>
Sat, 6 Jun 2020 14:53:12 +0000 (16:53 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 6 Jun 2020 14:53:12 +0000 (16:53 +0200)
commit28cc0e349273d8a7c41cc2a2aaf7b94f43644766
tree591a6c0c3a8bb62bf6ae85b4c20a642f54520048
parent71021c8633b276772cb75ec7705ddb2845df1ff9
msgunfmt: Detect more cases of invalid .mo files.

* gettext-tools/src/read-mo.c: Include hash-string.h.
(read_mo_file): Verify the array of messages and the hash table.
* gettext-tools/src/write-mo.c (write_table): Fix typo in comment.
* gettext-tools/src/Makefile.am (msgunfmt_SOURCES): Add hash-string.c.
* gettext-tools/tests/overflow-7.mo: Renamed from
gettext-tools/tests/sysdep-without-nul.mo.
* gettext-tools/tests/sysdep-without-nul.mo: New file.
* gettext-tools/tests/msgunfmt-3: Test also overflow-7.mo.
* gettext-tools/tests/Makefile.am (EXTRA_DIST): Add overflow-7.mo.
gettext-tools/src/Makefile.am
gettext-tools/src/read-mo.c
gettext-tools/src/write-mo.c
gettext-tools/tests/Makefile.am
gettext-tools/tests/msgunfmt-3
gettext-tools/tests/overflow-7.mo [new file with mode: 0644]
gettext-tools/tests/sysdep-without-nul.mo