Date: Sat, 01 Aug 2015 12:49:44 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 202022] bsdgrep -f crash with null pattern Message-ID: <bug-202022-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202022 Bug ID: 202022 Summary: bsdgrep -f crash with null pattern Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: kcwu@csie.org How to repeat: $ printf "\0" > nul $ bsdgrep -f nul /COPYRIGHT Segmentation fault (core dumped) According to http://pubs.opengroup.org/onlinepubs/9699919799/functions/getdelim.html "Although a NUL terminator is always supplied after the line, note that strlen(*lineptr) will be smaller than the return value if the line contains embedded NUL characters." bsdgrep didn't handle embedded NULL characters inside the pattern. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-202022-8>