Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Feb 1997 17:42:19 -0700 (MST)
From:      marcs@znep.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/2765: gopher port uses gets()
Message-ID:  <199702190042.RAA00230@vole.worldgate.com>
Resent-Message-ID: <199702190050.QAA15464@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         2765
>Category:       ports
>Synopsis:       gopher port uses gets()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 18 16:50:02 PST 1997
>Last-Modified:
>Originator:     Marc Slemko
>Organization:
>Release:        FreeBSD 2.2-GAMMA i386
>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;

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702190042.RAA00230>