Hello,

Running 'info mount' and following '*Note POSIX Safety Concepts'
leads to 'POSIX Safety Concepts: No such file or directory'
error.

I was able to reproduce the issue on Fedora and Arch Linux.

Here's content of the infodebug file:
info: looking for file "/usr/share/info/libc.info-11"
info: found file /usr/share/info/libc.info-11.gz
info: looking for file "POSIX Safety Concepts"
info: looking for file POSIX Safety Concepts in /usr/share/info
info: looking for file POSIX Safety Concepts in /usr/local/share/info
info: looking for file POSIX Safety Concepts in .
info: looking for file "posix safety concepts"
info: looking for file posix safety concepts in /usr/share/info
info: looking for file posix safety concepts in /usr/local/share/info
info: looking for file posix safety concepts in .

On the other hand 'info libc' and following the same link
works fine:
info: looking for file "libc"
info: looking for file libc in /usr/share/info
info: found file /usr/share/info/libc.info.gz
info: looking for file "/usr/share/info/libc.info-1"
info: found file /usr/share/info/libc.info-1.gz

The culprit seems to be info_find_subfile() function in nodes.c,
more precisely this line:
        /* Check if fullpath starts the name of the recorded file (extra
           extensions like ".info.gz" could be added.) */
        if (!strncmp (file_buffer->fullpath, fullpath, strlen (fullpath)))

If "/usr/share/info/libc.info-11" is on the list of already
loaded files ('info mount' case), that comparison falsely succeeds
(!strncmp ("/usr/share/info/libc.info-11",
        "/usr/share/info/libc.info-1",
        27))

But the node obviously isn't present there and following the reference
fails in the end. Otherwise correct file
"/usr/share/info/libc.info-1.gz" is found and the node is displayed.

Best regards,
Vita

-- 
Vitezslav Crhonek
Software Engineer
Red Hat

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to