Hello, while implementing whitelist mechanism in my shell scripting, I've noticed an inconsistency between busybox's grep and GNU grep. They handle -xf EMPTY_FILE flags differently when EMPTY_FILE is well... empty. GNU grep in that case handles it as if /.*/ pattern was provided, while busybox uses //. Attached patch fixes this issue. I've both added a test case into grep's testsuite and I've also used following shell script to verify that the behavior does match now: http://lists.busybox.net/pipermail/busybox/2020-April/087915.html
Fixed in git