CVSROOT: /cvs Module name: src Changes by: chel...@cvs.openbsd.org 2021/11/16 16:34:24
Modified files: usr.bin/wc : wc.c Log message: wc(1): fix NULL pointer dereference in cnt() If the "file" argument to cnt() is NULL and we call warn(3) we will get a NULL dereference. Change the name of the argument to "path" and make "file" a local variable. Ensure that we set "file" to a valid C-string, even if "path" is NULL. While we're here, const the file name pointers, too. Thread: https://marc.info/?l=openbsd-tech&m=163708784422157&w=2 ok millert@