This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU M4 source repository".
http://git.sv.gnu.org/gitweb/?p=m4.git;a=commitdiff;h=33ac212bed1448f8fd9b87f94f4c1c79461f2eaf The branch, master has been updated via 33ac212bed1448f8fd9b87f94f4c1c79461f2eaf (commit) from ec19d062daf1e3402fefa1f81f59a9460a878e9d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 33ac212bed1448f8fd9b87f94f4c1c79461f2eaf Author: Eric Blake <[EMAIL PROTECTED]> Date: Tue Jun 10 07:00:29 2008 -0600 Avoid corrupted frozen file if NUL appears on block boundary. * m4/output.c (insert_file): Separate consecutive quotearg blocks with \<newline>, in case last byte of first block was NUL. Signed-off-by: Eric Blake <[EMAIL PROTECTED]> ----------------------------------------------------------------------- Summary of changes: ChangeLog | 6 ++++++ m4/output.c | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index b94b250..b2f0cc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-10 Eric Blake <[EMAIL PROTECTED]> + + Avoid corrupted frozen file if NUL appears on block boundary. + * m4/output.c (insert_file): Separate consecutive quotearg blocks + with \<newline>, in case last byte of first block was NUL. + 2008-06-03 Eric Blake <[EMAIL PROTECTED]> Fix printf type mismatches. diff --git a/m4/output.c b/m4/output.c index d3c5507..f94cbd2 100644 --- a/m4/output.c +++ b/m4/output.c @@ -749,6 +749,7 @@ insert_file (m4 *context, FILE *file, bool escaped) char buffer[COPY_BUFFER_SIZE]; size_t length; char *str = buffer; + bool first = true; assert (output_diversion); /* Insert output by big chunks. */ @@ -761,7 +762,13 @@ insert_file (m4 *context, FILE *file, bool escaped) if (length == 0) break; if (escaped) - str = quotearg_style_mem (escape_quoting_style, buffer, length); + { + if (first) + first = false; + else + m4_output_text (context, "\\\n", 2); + str = quotearg_style_mem (escape_quoting_style, buffer, length); + } m4_output_text (context, str, escaped ? strlen (str) : length); } } hooks/post-receive -- GNU M4 source repository
