From: didg Date: Mon, 26 Jan 2009 15:06:31 +0000 (+0000) Subject: another myfgets off by one X-Git-Tag: netatalk-2-0-4-rc1~18 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=90e2417be745a6bd9905e9c2c3a1f8448c41fb6d another myfgets off by one --- diff --git a/etc/afpd/volume.c b/etc/afpd/volume.c index 8bd76a4d..57bca6cd 100644 --- a/etc/afpd/volume.c +++ b/etc/afpd/volume.c @@ -1,5 +1,5 @@ /* - * $Id: volume.c,v 1.51.2.7.2.33.2.17 2009-01-26 10:34:31 didg Exp $ + * $Id: volume.c,v 1.51.2.7.2.33.2.18 2009-01-26 15:06:31 didg Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -728,7 +728,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;