Vanilla Development Maling List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS update: Vanilla/ntserv



Date:	Monday March 15, 1999 @ 4:42
Author:	cameron

Update of /home/netrek/cvsroot/Vanilla/ntserv
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv797/ntserv

Modified Files:
	daemonII.c feature.c sysdefaults.c 
Log Message:
Change all gets() calls to fgets(), review all existing fgets() calls
and fix prevalent defect of using one byte less than the buffer size.
Confirmed on man page that size is actual size.  Even I've done it!


****************************************

Index: Vanilla/ntserv/daemonII.c
diff -u Vanilla/ntserv/daemonII.c:1.14 Vanilla/ntserv/daemonII.c:1.15
--- Vanilla/ntserv/daemonII.c:1.14	Sun Mar 14 20:51:16 1999
+++ Vanilla/ntserv/daemonII.c	Mon Mar 15 04:42:40 1999
@@ -2823,7 +2823,7 @@
     if (fp==NULL) {
         exit(0);
     }
-    fgets(buf, 99, fp);
+    fgets(buf, 100, fp);
     s=RINDEX(buf, ':');
     if (s==NULL) {
         SIGNAL(SIGCHLD, SIG_DFL);
Index: Vanilla/ntserv/feature.c
diff -u Vanilla/ntserv/feature.c:1.1.1.1 Vanilla/ntserv/feature.c:1.2
--- Vanilla/ntserv/feature.c:1.1.1.1	Wed Nov 11 20:44:52 1998
+++ Vanilla/ntserv/feature.c	Mon Mar 15 04:42:41 1999
@@ -74,7 +74,7 @@
    if(!f) return;
 
    num_features = 0;
-   while(fgets(buf, 511, f)){
+   while(fgets(buf, 512, f)){
       if(buf[0] == '#' || buf[0] == '\n') continue;
       /* old format. Ignore */
       if(INDEX(buf, ':')) continue;
Index: Vanilla/ntserv/sysdefaults.c
diff -u Vanilla/ntserv/sysdefaults.c:1.9 Vanilla/ntserv/sysdefaults.c:1.10
--- Vanilla/ntserv/sysdefaults.c:1.9	Fri Mar  5 19:20:53 1999
+++ Vanilla/ntserv/sysdefaults.c	Mon Mar 15 04:42:41 1999
@@ -1,4 +1,9 @@
 /* $Log: sysdefaults.c,v $
+/* Revision 1.10  1999/03/15 10:42:41  cameron
+/* Change all gets() calls to fgets(), review all existing fgets() calls
+/* and fix prevalent defect of using one byte less than the buffer size.
+/* Confirmed on man page that size is actual size.  Even I've done it!
+/*
 /* Revision 1.9  1999/03/06 01:20:53  cameron
 /* remove iggy from INL pregame
 /*
@@ -120,7 +125,7 @@
     }
     stat(SysDef_File, &oldstat);
 
-    while (fgets(buf, 199, f)!=NULL) {
+    while (fgets(buf, 200, f)!=NULL) {
 	if (buf[0] == '#') continue; /* a comment */
 	s=INDEX(buf, '=');
 	if (s==NULL) continue;