On Nov 2,  9:02am, p...@whooppee.com (Paul Goyette) wrote:
-- Subject: Re: CVS commit: src/sys/dev/pci

| Even in the non-overflow case, if you write x-1 chars (not including the 
| trailing NUL) to a buffer of size x, the updated value of len will be 1 
| (and dest would point to the last valid character of the buffer).  We 
| would need additional code in the non-overflow path
| 
|       if (*len == 1)
|               *len = 0;
| 
| to maintain consistency with the overflow path.
| 

I guess what you have now is simpler; keep it :-)

christos

Reply via email to