]> arthur.barton.de Git - netatalk.git/commitdiff
another myfgets off by one
authordidg <didg>
Mon, 26 Jan 2009 15:09:31 +0000 (15:09 +0000)
committerdidg <didg>
Mon, 26 Jan 2009 15:09:31 +0000 (15:09 +0000)
etc/afpd/volume.c

index 1f0311d2f809f84fad630f1034843079f2be6917..e080b679c481952fcdb22a8d51d4b8b6c4532625 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.c,v 1.74 2009-01-26 10:37:19 didg Exp $
+ * $Id: volume.c,v 1.75 2009-01-26 15:09:31 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -707,7 +707,7 @@ FILE        *fp;
     int                c;
 
     p = buf;
-    while ((EOF != ( c = getc( fp )) ) && ( size > 0 )) {
+    while ((EOF != ( c = getc( fp )) ) && ( size > 1 )) {
         if ( c == '\n' || c == '\r' ) {
             *p++ = '\n';
             break;