Subject: Re: i386 build fails at running fc-cache
To: None <current-users@NetBSD.org>
From: Christian Biere <christianbiere@gmx.de>
List: current-users
Date: 02/02/2004 22:10:13
--kORqDWCi7qDJ0mEj
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Luke Mewburn wrote:
>   | This smells like off-by-one if not two.
=20
> It failed because $HOME wasn't set, so strlen((char*)home) dumped core ...
> That's what the patch is working around.

Sorry, I shouldn't have commented on a excerpt from the complete code.
There's no such off-by-one bug, of course. Increasing ``s'' before doing
the strlen() would have made this more obvious, though. Well, replacing
``~'' by $HOME even if not followed by a ``/'' looks a little strange to me
but it's documented this way. I also wonder why they ignore pw->pw_dir.

--=20
Christian

--kORqDWCi7qDJ0mEj
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFAHry00KQix3oyIMcRAr6NAJ4vbcJsQzjKbyVpwoUgyrN3CPh0rACfcJnC
XvMGEhxJ6gmSjshXrP+g9Xs=
=bzcr
-----END PGP SIGNATURE-----

--kORqDWCi7qDJ0mEj--