svn commit: r452288 - in head/misc/estic: . files

Max Khon fjoe at FreeBSD.org
Tue Oct 17 18:32:01 UTC 2017


Author: fjoe
Date: Tue Oct 17 18:31:59 2017
New Revision: 452288
URL: https://svnweb.freebsd.org/changeset/ports/452288

Log:
  Use fgets(3)+strcspn(3) instead of gets(3)
  
  Approved by:	MAINTAINER

Added:
  head/misc/estic/files/patch-areacode-actest.c   (contents, props changed)
Modified:
  head/misc/estic/Makefile

Modified: head/misc/estic/Makefile
==============================================================================
--- head/misc/estic/Makefile	Tue Oct 17 17:45:10 2017	(r452287)
+++ head/misc/estic/Makefile	Tue Oct 17 18:31:59 2017	(r452288)
@@ -3,7 +3,7 @@
 
 PORTNAME=		estic
 PORTVERSION=		1.61
-PORTREVISION=		5
+PORTREVISION=		6
 CATEGORIES=		misc comms
 MASTER_SITES=		LOCAL/dinoex
 PKGNAMESUFFIX?=		${NOX11_SUFFIX}${PKGNAMESUFFIX2}

Added: head/misc/estic/files/patch-areacode-actest.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/misc/estic/files/patch-areacode-actest.c	Tue Oct 17 18:31:59 2017	(r452288)
@@ -0,0 +1,12 @@
+--- areacode/actest.c.orig	1997-02-16 11:22:50.000000000 +0000
++++ areacode/actest.c	2017-10-17 18:26:38.899231000 +0000
+@@ -60,7 +60,8 @@
+ 
+         printf ("Enter phone number: ");
+         fflush (stdout);
+-        gets (Buf);
++        fgets (Buf, sizeof(Buf), stdin);
++        Buf[strcspn (Buf, "\n")] = '\0';
+         if (strlen (Buf) == 0) {
+             break;
+         }


More information about the svn-ports-all mailing list