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