🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
2 messages
2 total messages Started by Hans Lambermont Thu, 08 Jan 1998 00:00
INN's nnrpd.c 1.5.1sec2 to 1.7.2 changes
#25031
Author: Hans Lambermont
Date: Thu, 08 Jan 1998 00:00
25 lines
1392 bytes
Hello,

This is a diff part of my old (1.5.1sec2) nnrpd.c against the new
(1.7.2) one:
<     (void)snprintf(buff, sizeof(buff), "%s %s", ClientHost, what);
---
>     (void)sprintf(buff, "%s %s", ClientHost, what);
<     (void)snprintf(buff, sizeof(buff), "(nnrpd) %s %s", ClientHost,
what);
---
>     (void)sprintf(buff, "(nnrpd) %s %s", ClientHost, what);
etc.

A lot of safety checks are removed in the new 1.7.2 version. Why?

regards,
   Hans
-- 
Ir. Hans Lambermont        http://www.mpn.cp.philips.com/Hans.Lambermont
TIS/INS, VN507                        Hans.Lambermont@mpn.cp.philips.com
Origin IT Systems Management/NL bv    phone/fax: (+31 40 27) 85376/88729
PO Box 218, 5600MD Eindhoven, Netherlands          GSM: (+31) 6 53252172

Re: INN's nnrpd.c 1.5.1sec2 to 1.7.2 changes
#25023
Author: Forrest J. Cavalier III
Date: Thu, 08 Jan 1998 00:00
61 lines
2522 bytes
In article <34B4937A.3F54BC7E@nl.origin-it.com>, 
Hans.Lambermont@nl.origin-it.com wrote...
>
>Hello,
>
>This is a diff part of my old (1.5.1sec2) nnrpd.c against the new
>(1.7.2) one:
><     (void)snprintf(buff, sizeof(buff), "%s %s", ClientHost, what);
>---
>>     (void)sprintf(buff, "%s %s", ClientHost, what);
><     (void)snprintf(buff, sizeof(buff), "(nnrpd) %s %s", ClientHost,
>what);
>---
>>     (void)sprintf(buff, "(nnrpd) %s %s", ClientHost, what);
>etc.
>
>A lot of safety checks are removed in the new 1.7.2 version. Why?

Well, they weren't actually "removed."  1.7 does not derive from
1.5.1sec2.

Geneology of recent versions of INN....
	INN 1.5.1 was used to derive versions
		INN 1.6, 1.6b3

		INN 1.5.1sec, sec2

		INN 1.5.1corr

	INN 1.5.1corr was used to derive versions
		INN 1.7

	INN 1.7 was used to derive INN 1.7.1 and INN 1.7.2

	INN 1.8 is in development.  It is based on a combination of
                the defect fixes which make up INN 1.7, and
                the work of Clayton O'Neill.  Other features
                have been added.

More information at:
     http://www.mibsoftware.com/userkt/inn/patches/0033.htm


The code snippet you posted was part of the changes by SNI
to fix buffer overruns in INN 1.5.1.  

Most of the SNI changes were actually unnecessary upon
closer inspection.   They protected against buffer
overruns which would never happen.  INN 1.5.1corr was a
selection of those changes which were necessary - a much
smaller set, and without the need for snprintf() (which is
not available by default in many O/S libraries.)

Forrest J. Cavalier III, Mib Software, INN customization and consulting 
Defect lists for versions of INN, including INN 1.5.1sec2 through
     http://www.mibsoftware.com/userkt/inn/patches/
Commercial support for INN: http://www.mibsoftware.com/innsup.htm 


Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads