From marcs@vole.worldgate.com  Tue Feb 18 16:42:33 1997
Received: from vole.worldgate.com (vole.worldgate.com [198.161.84.13])
          by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id QAA14651
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 18 Feb 1997 16:42:30 -0800 (PST)
Received: (from marcs@localhost)
	by vole.worldgate.com (8.8.5/8.8.5) id RAA00230;
	Tue, 18 Feb 1997 17:42:19 -0700 (MST)
Message-Id: <199702190042.RAA00230@vole.worldgate.com>
Date: Tue, 18 Feb 1997 17:42:19 -0700 (MST)
From: marcs@znep.com
Reply-To: marcs@znep.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: gopher port uses gets()
X-Send-Pr-Version: 3.2

>Number:         2765
>Category:       ports
>Synopsis:       gopher port uses gets()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 18 16:50:02 PST 1997
>Closed-Date:    Sun Mar 2 05:37:27 PST 1997
>Last-Modified:  Sun Mar  2 05:37:50 PST 1997
>Originator:     Marc Slemko
>Release:        FreeBSD 2.2-GAMMA i386
>Organization:
>Environment:

gopher-2.1.3 port

>Description:

From gopher2_1_3/gopher/upload.c:
               while(gets(inputline)) {
                    ZapCRLF(inputline);
                    if (strcmp(inputline, ".") == 0) 
                         break;
                    FIOwritestring(fio, inputline);
               }

Yea, yea, no one uses gopher any more (although I am quite tempted
after re-experiencing how fast it is...) but...

>How-To-Repeat:


>Fix:

*** upload.c.dist	Tue Feb 18 17:31:30 1997
--- upload.c	Tue Feb 18 17:40:22 1997
***************
*** 123,129 ****
  		    CURenter();
  		    return;
  	       }
! 	       while(gets(inputline)) {
  		    ZapCRLF(inputline);
  		    if (strcmp(inputline, ".") == 0) 
  			 break;
--- 123,129 ----
  		    CURenter();
  		    return;
  	       }
! 	       while(fgets(inputline, 256, stdin)) {
  		    ZapCRLF(inputline);
  		    if (strcmp(inputline, ".") == 0) 
  			 break;

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: asami 
State-Changed-When: Sun Mar 2 05:37:27 PST 1997 
State-Changed-Why:  
Added the patch, thanks! 
>Unformatted:
