On Sun, 03 Mar 2019 11:33:07 -0800, randir wrote: > This is a bug report for perl from sergey.aleynikov@gmail.com, > generated with the help of perlbug 1.41 running under perl 5.29.9. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > While fuzzing perl v5.29.8-21-gde59f38ed9 built with afl and run > under libdislocator, I found the program attached to this message to > cause an assertion failure: > > perl: bsd_glob.c:759: int glob3(Char *, Char *, Char *, Char *, Char > *, Char *, Char *, glob_t *, size_t *): Assertion `restpattern < > restpattern_last' failed. > I believe this is an error in the assertion. The pattern in this case is exactly 4095 bytes long, you can reproduce this with: my $str = ("0" x 4094) . "?"; glob $str; At the point of the call to glob3() restpattern points one past the end of the pattern (ie. at the terminating NUL for a simple glob) and restpattern_last points at the last byte in the buffer (*not* one past the end) ie. patbuf + MAXPATHLEN -1 (patbuf in glob0()). So in this case they're equal and the assertion fails. Tony --- via perlbug: queue: perl5 status: new https://rt.perl.org/Ticket/Display.html?id=133888