mirror of
https://https.git.savannah.gnu.org/git/gettext.git
synced 2026-01-26 07:37:57 +00:00
msgfmt: Don't overflow the stack with large values for --alignment.
Reported by <maxtodeath@gmail.com> at <https://savannah.gnu.org/bugs/?67743>. * gettext-tools/src/write-mo.c (write_table): Use xmalloca instead of alloca to allocate the buffer to fill with NUL bytes.
This commit is contained in:
parent
c979c72860
commit
969c026038
@ -1010,7 +1010,7 @@ write_table (FILE *output_file, message_list_ty *mlp)
|
||||
offset = end_offset;
|
||||
|
||||
/* A few zero bytes for padding. */
|
||||
char *null = (char *) alloca (alignment);
|
||||
char *null = (char *) xmalloca (alignment);
|
||||
memset (null, '\0', alignment);
|
||||
|
||||
/* Now write the original strings. */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user