bug-texinfo
[Top][All Lists]
Advanced

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

Corrupted directory output


From: Brendan O'Dea
Subject: Corrupted directory output
Date: Sun, 21 Nov 2021 01:40:13 +1100

Malformed info files cause install-info to produce corrupted dir files.

See attached example, where the folding info page contains:

  START-INFO-DIR-ENTRY
  * folding: folding editor minor mode for Emacs
  END-INFO-DIR-ENTRY

which results in the corrupted `dir` file in the attached archive.

I'm submitting a patch to the folding author to fix the @direntry for that package, but install-info should probably be more resilient to badly formed input.

Some poking around suggests that the problem is in reformat_new_entries, where this sequence near the top of the for loop:

  split_entry (entry->text, &name, &name_len, &desc, &desc_len);
  free (entry->text);

frees entry->text.  When format_entry is called at the bottom that loop, it exits early due to this condition (desc is NULL):

  if (!desc || !name)
    return 1;

...which does not set outstr_out (entry->text), leading to the corruption.

--bod

Attachment: bug.tar.gz
Description: application/gzip


reply via email to

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