#769732 less: Segfault when a file disappears

Package:
less
Source:
less
Description:
pager program similar to more
Submitter:
Peter De Wachter
Date:
2024-05-01 02:27:05 UTC
Severity:
normal
Tags:
#769732#5
Date:
2014-11-15 23:40:23 UTC
From:
To:
less can crash if a file disappears while viewing multiple files. To
reproduce:

    touch a; mkdir b c; touch d
    less a b c d

Now, in a different terminal, delete the 'a' file. Then, back in less,
give the ':n' command to move to the next file. You'll get output
similar to this:

    a: No such file or directory  (press RETURN)
    c is a directory  (press RETURN)
    (random bytes): No such file or directory  (press RETURN)
    Segmentation fault