Subject: Re: bin/31077: /usr/bin/make can read off of end of buffer
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 08/27/2005 08:04:04
The following reply was made to PR bin/31077; it has been noted by GNATS.

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Cc: 
Subject: Re: bin/31077: /usr/bin/make can read off of end of buffer
Date: Sat, 27 Aug 2005 04:03:05 -0400

 On Aug 26, 10:20pm, wiml@hhhh.org (wiml@hhhh.org) wrote:
 -- Subject: bin/31077: /usr/bin/make can read off of end of buffer
 
 | Line 434: Buf_AddBytes() can't actually handle a NULL value. I don't know if val==NULL can happen in practice, but since there was safeguard code there already, I think it's good if it actually works.
 
 It can. memcpy with 0, length does not touch the buffer.
 
 | Line 1888: This is the main offender. Uh, I guess whoever applies this should remove that printf.
 
 I've committed that.
 
 | Line 3265: This is an equivalent problem. I haven't been able to exercise this part of the code, and the code surrounding it is more complex than around line 1888, so I'm not as confident that this is correct. Looks good to me, though.
 
 And that....
 
 Although both should probably raise an error... I'll think about it.
 
 christos