m4-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: branch-1_4 allocation overflow


From: Eric Blake
Subject: Re: branch-1_4 allocation overflow
Date: Thu, 26 Oct 2006 14:54:04 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> 2006-10-25  Eric Blake  <ebb9 <at> byu.net>
> 
>       * src/output.c (make_diversion): Avoid size_t overflow.
>       * doc/m4.texinfo (Diversions): Test this fix.
>       * src/input.c (input_block): Remove unused member.  Reduce size
>       of struct.
>       (push_file, pop_input): Avoid useless assignment.

Oops, those changes to input.c were not only unrelated to the size_t overflow 
issue, but they were incomplete.  This removes additional dead code; together, 
both patches clean up some fallout of things rendered unnecessary by the 
location tracking overhaul.

2006-10-26  Eric Blake  <address@hidden>

        * src/input.c (pop_input): Remove unnecessary code.

Index: src/input.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/input.c,v
retrieving revision 1.1.1.1.2.29
diff -u -r1.1.1.1.2.29 input.c
--- src/input.c 26 Oct 2006 04:45:31 -0000      1.1.1.1.2.29
+++ src/input.c 26 Oct 2006 14:50:26 -0000
@@ -353,21 +353,6 @@
          retcode = EXIT_FAILURE;
        }
       start_of_input_line = isp->u.u_f.advance_line;
-      if (tmp == NULL)
-       {
-         /* We have exhausted the current input stack.  However,
-            freeing the obstack now is a bad idea, since if we are in
-            the middle of a quote, comment, dnl, or argument
-            collection, there is still a pointer to the former
-            current_file that we must not invalidate until after the
-            warning message has been issued.  Setting next to a
-            non-string is safe in this case, because the only place
-            more input could come from is another push_file or
-            pop_wrapup, both of which then free the input_block.  */
-         next = isp;
-         isp = NULL;
-         return;
-       }
       output_current_line = -1;
       break;
 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]