Subject: Re: CVS commit: basesrc/libexec/telnetd
To: None <itojun@netbsd.org>
From: Assar Westerlund <assar@netbsd.org>
List: source-changes
Date: 07/19/2001 17:22:44
Jun-ichiro itojun Hagino <itojun@netbsd.org> writes:
> Module Name:	basesrc
> Committed By:	itojun
> Date:		Thu Jul 19 04:57:51 UTC 2001
> 
> Modified Files:
> 	basesrc/libexec/telnetd: authenc.c ext.h state.c sys_term.c telnetd.c
> 	    telnetd.h termstat.c utility.c
> 
> Log Message:
> bound-check all "*nfrontp++" code.  from openbsd/heimdal.
> bark if file descriptor goes above FD_SETSIZE.  from openbsd.

output_data:

	ret = vsnprintf(nfrontp, remaining, format, args);
	nfrontp += ret;

shouldn't this be:

       	ret = vsnprintf(nfrontp, remaining, format, args);
	nfrontp += min(ret, remaining-1);

?

/assar