Subject: Re: bin/34658: [dM] identd truncates queries to first segment
To: None <peter@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Christian Biere <christianbiere@gmx.de>
List: netbsd-bugs
Date: 09/29/2006 16:35:01
The following reply was made to PR bin/34658; it has been noted by GNATS.

From: Christian Biere <christianbiere@gmx.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/34658: [dM] identd truncates queries to first segment
Date: Fri, 29 Sep 2006 18:31:16 +0200

 Christian Biere wrote:
 >  No, "sizeof(buf)-qlen" becomes negative but the 3rd argument of
 >  recv() has type size_t which means it is promoted to a huge unsigned
 >  integer value.
 
 For what it's worth, the NetBSD implementation of recv() saves you by
 failing with EINVAL if the size argument exceeds SSIZE_MAX. This isn't
 required by POSIX so I'd never rely on that. Other functions had
 their behaviour changed within these bounds before (e.g., basename(3)).
 
 -- 
 Christian