By mistake, I typed the command "makeinfo texinfo.tex" in
Texinfo's doc directory and was surprised to get a segfault.  I
then deleted lines and characters until I reproduced the segfault
with a file that contains the following single line:
        [EMAIL PROTECTED]

The problem is an attempt to free() a string that was not
allocated with malloc().

Here is the fix:

--- makeinfo.c  14 Aug 2008 21:00:52 -0700      1.120
+++ makeinfo.c  14 Aug 2008 21:28:11 -0700      
@@ -2374,7 +2374,7 @@ remember_brace_1 (COMMAND_FUNCTION (*pro
   BRACE_ELEMENT *new = xmalloc (sizeof (BRACE_ELEMENT));
   new->next = brace_stack;
   new->proc = proc;
-  new->command = command ? xstrdup (command) : "";
+  new->command = xstrdup (command ? command : "");
   new->pos = position;
   new->line = line_number;
   new->in_fixed_width_font = in_fixed_width_font;
-- 
Peter Seebach on managing engineers:
"It's like herding cats, only most of the engineers are already
 sick of laser pointers."


Reply via email to