[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pkg_info bug
On Tue, 9 Mar 1999, Marco S Hyman wrote:
> Date: Tue, 09 Mar 1999 11:08:19 -0800
> From: Marco S Hyman <marc@snafu.org>
> To: "Denis A. Doroshenko" <cyxob@tipas.lt>
> Cc: WHS <wouters@cistron.nl>, "OpenBSD tech." <tech@openbsd.org>
> Subject: Re: pkg_info bug
>
> > ones, should we? btw, fgets/strlen are not the best "twix", since their
> > result not always corresponds to reality.
>
> Ooops, upon second look the change is not necessary. Line length
> can not be zero unless the file is empty, and if the file is empty
> fgets returns a null pointer so the code that used line_length
> is skipped.
Really? How about lines like "\0heh, 'tis nice line!\n" ? strlen will
return 0 and bla bla bla...
Sure, i maybe wrong... somebody correct me!
> // marc
>
--
CYXOB