Subject: Re: cleaning up the rest of dtom()
To: enami tsugutomo <enami@cv.sony.co.jp>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 06/25/1997 22:35:58
On 26 Jun 1997 14:25:07 +0900 
 enami tsugutomo <enami@cv.sony.co.jp> wrote:

 > I found that if address length is longer than 255 bytes, sun_len
 > overflows (though socket is created and can communicate with it).

Hmm, not much we can do about that... sigh... well, adding the following
code to the beginning of sockargs() should take care of that:

	/*
	 * We can't allow socket names > 255 in length, since that
	 * will overflow sa_len.
	 */
	if (type == MT_SONAME && (u_int)buflen > 255)
		return (EINVAL);

Thank you very much for the sanity checks!  Much appreciated!

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939