Date: Fri, 6 Sep 2019 20:06:03 +0000 (UTC) From: Kai Knoblich <kai@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r511359 - in branches/2019Q3/vietnamese/vnconvert: . files Message-ID: <201909062006.x86K633X086032@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kai Date: Fri Sep 6 20:06:03 2019 New Revision: 511359 URL: https://svnweb.freebsd.org/changeset/ports/511359 Log: MFH: r511321 vietnamese/vnconvert: Replace gets(3) with gets_s(3) The long deprecated and unsafe gets(3) function has been removed since FreeBSD 1300043. Thus replace the occurences of that function in the code with gets_s(3) which is a safer alternative. * Bump PORTREVISION due to changes in the code/package. PR: 238687 Reported by: emaste Approved by: ports-secteam (joneum) Added: branches/2019Q3/vietnamese/vnconvert/files/patch-vnconvert.c - copied unchanged from r511321, head/vietnamese/vnconvert/files/patch-vnconvert.c Modified: branches/2019Q3/vietnamese/vnconvert/Makefile Directory Properties: branches/2019Q3/ (props changed) Modified: branches/2019Q3/vietnamese/vnconvert/Makefile ============================================================================== --- branches/2019Q3/vietnamese/vnconvert/Makefile Fri Sep 6 20:01:29 2019 (r511358) +++ branches/2019Q3/vietnamese/vnconvert/Makefile Fri Sep 6 20:06:03 2019 (r511359) @@ -3,6 +3,7 @@ PORTNAME= vnconvert PORTVERSION= 1.0 +PORTREVISION= 1 CATEGORIES= vietnamese MASTER_SITES= LOCAL/obrien DISTNAME= convert Copied: branches/2019Q3/vietnamese/vnconvert/files/patch-vnconvert.c (from r511321, head/vietnamese/vnconvert/files/patch-vnconvert.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2019Q3/vietnamese/vnconvert/files/patch-vnconvert.c Fri Sep 6 20:06:03 2019 (r511359, copy of r511321, head/vietnamese/vnconvert/files/patch-vnconvert.c) @@ -0,0 +1,45 @@ +--- vnconvert.c.orig 1994-05-20 20:36:17 UTC ++++ vnconvert.c +@@ -91,7 +91,7 @@ main() + printf("\t6 - VN Thin-Art (Mac)\n\n"); + + printf("Input-file name (or Enter to quit): "); +- gets(bufline); ++ gets_s(bufline, 255); + if (strlen(bufline) == 0) + break; + sscanf(bufline, "%s", input_file); +@@ -99,21 +99,21 @@ main() + printf("currently in the format number: "); + *bufline = '\0'; + while (strlen(bufline)==0) { +- gets(bufline); ++ gets_s(bufline, 255); + sscanf(bufline, "%d", &from); + } + + printf("\nOutput-file name: "); + *bufline = '\0'; + while (strlen(bufline)==0) { +- gets(bufline); ++ gets_s(bufline, 255); + sscanf(bufline, "%s", output_file); + } + + printf("to the format number: "); + *bufline = '\0'; + while (strlen(bufline)==0) { +- gets(bufline); ++ gets_s(bufline, 255); + sscanf(bufline, "%d", &to); + } + +@@ -152,7 +152,7 @@ main() + } + else { + fprintf(stderr, "\"%s\" already exists. Overwrite it (y/n)? ", output_file); +- gets(buf); ++ gets_s(buf, BUFSIZ); + if (toupper(buf[0]) != 'Y') + icontinue = 1; + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909062006.x86K633X086032>