Reported by Tobi Schäfer at <https://trac.macports.org/ticket/58323>,
via Ryan Schmidt <@ryandesign.com> at <https://savannah.gnu.org/bugs/?56112>.
Patch proposed by Joshua Root.
* gettext-tools/src/write-java.c (msgid_hashcode): Allocate memory for the
trailing NUL byte as well.
char *combined;
unsigned int result;
- combined = (char *) xmalloca (combined_len);
+ combined = (char *) xmalloca (combined_len + 1);
memcpy (combined, msgctxt, msgctxt_len);
combined[msgctxt_len] = MSGCTXT_SEPARATOR;
memcpy (combined + msgctxt_len + 1, msgid, msgid_len + 1);