netbsd-bugs@netbsd.org
[Top] [All Lists]

Re: bin/31077: /usr/bin/make can read off of end of buffer

Subject: Re: bin/31077: /usr/bin/make can read off of end of buffer
From: Christos Zoulas
Date: Sat, 27 Aug 2005 04:03:05 -0400
On Aug 26, 10:20pm, wiml@xxxxxxxx (wiml@xxxxxxxx) 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

<Prev in Thread] Current Thread [Next in Thread>