On Tue, Nov 16, 2021 at 12:39:32PM -0700, Todd C. Miller wrote:
> On Tue, 16 Nov 2021 12:35:59 -0600, Scott Cheloha wrote:
> 
> > In wc(1), the "file" argument to cnt() is NULL when we're enumerating
> > the standard input.  This causes a NULL pointer dereference if we ever
> > hit one of the warn(3) calls in that function.
> >
> > To fix, change the argument name to "path" and make "file" a local
> > variable that is always initialized to point to a C string.
> >
> > While we're here we may as well const the argument pointers.
> 
> I don't see the need for separate "path" and "file" variables but
> if it makes you happy, then OK.

How would you do it?  This seemed like the smallest diff to me because
we don't have to change all the warn(3) calls.  Is there an easier thing?

Reply via email to