Subject: Re: recent 1-6 branch libc and mozilla (etc.)
To: enami tsugutomo <enami@but-b.or.jp>
From: Todd C. Miller <Todd.Miller@courtesan.com>
List: current-users
Date: 10/09/2003 16:28:23
In message <20031009221234.410112ECA@decoy.but-b.or.jp>
	so spake enami tsugutomo (enami):

> But it is normal end condition.  Where the *cp is accessed in the case
> exactly?

Looking at this again I think you are correct.  As long as the eom
check is done before *cp is accessed it should be OK.  The relevant
code is different between NetBSD and OpenBSD.

In OpenBSD, cp >= eom simply breaks out of the loop in getanswer()
(which mateches the loop invariant) whereas in NetBSD, the BOUNDS_CHECK
macro makes this a fatal error.  That would result in returning
NULL with h_errno set to NO_RECOVERY if the buffer was filled
exactly.

 - todd