bug-texinfo
[Top][All Lists]
Advanced

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

Segmentation fault caused by bug in makeinfo


From: Andreas Vögele
Subject: Segmentation fault caused by bug in makeinfo
Date: Sun, 1 May 2005 10:00:33 +0200

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

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--;

Attachment: patch-makeinfo_multi_c
Description: Binary data


reply via email to

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