1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

Fix fgets buffer overflow

Obtained from:	OpenBSD
This commit is contained in:
Kris Kennaway 2003-06-27 03:36:50 +00:00
parent 6a78684fea
commit 4e870334c1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=83699
2 changed files with 13 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= spice
PORTVERSION= 3f5.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= cad
MASTER_SITES= ftp://ic.eecs.berkeley.edu/pub/Spice3/
DISTNAME= sp3f4.kit

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_lib_fte_misccoms_c,v 1.1 2003/04/14 10:28:03 avsm Exp $
--- src/lib/fte/misccoms.c.orig Mon Apr 14 11:19:24 2003
+++ src/lib/fte/misccoms.c Mon Apr 14 11:21:00 2003
@@ -286,7 +286,7 @@ com_quit(wl)
fprintf(cp_out,
"\nAre you sure you want to quit (yes)? ");
(void) fflush(cp_out);
- if (!fgets(buf, BSIZE_SP, stdin)) {
+ if (!fgets(buf, sizeof buf, stdin)) {
clearerr(stdin);
*buf = 'y';
}