Author :
cheloha
Date :
2021-11-16 23:34:24
Hash :cca9d5ee 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@