bug-texinfo
[Top][All Lists]
Advanced

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

Re: Segmentation fault caused by bug in makeinfo


From: Otto Moerbeek
Subject: Re: Segmentation fault caused by bug in makeinfo
Date: Sun, 1 May 2005 19:49:16 +0200 (CEST)


On Sun, 1 May 2005, [ISO-8859-1] Andreas V?gele wrote:

> There seems to be a bug in textinfo/makeinfo/multi.c in the function 
> output_multitable_row().

Fix committed, thanks,

        -Otto

> 
> If a column contains only whitespace the following code may cause a 
> segmentation fault.  The problem is that the offset is only checked for 
> zero before the loop but not while the loop is decrementing the offset.
> 
>    /* remove trailing whitespace from each column */
>    [...]
>    if (envs[i].output_paragraph_offset)
>      while (cr_or_whitespace (CHAR_AT (envs[i].output_paragraph_offset - 
> 1)))
>        envs[i].output_paragraph_offset--;
> 
> I can reproduce this problem under OpenBSD-current when building the 
> documentation for Automake 1.9.5. The bug is also present in the CVS at 
> savannah.gnu.org.
> 
> Makeinfo doesn't crash if the offset is checked in the loop:
> 
>    while (envs[i].output_paragraph_offset
>           && cr_or_whitespace (CHAR_AT (envs[i].output_paragraph_offset 
> - 1)))
>      envs[i].output_paragraph_offset--;
> 
> [demime 1.01d removed an attachment of type application/octet-stream which 
> had a name of patch-makeinfo_multi_c]
> 
> 

reply via email to

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