ports/cad/spice/files/patch-src_lib_fte_misccoms_c
Kris Kennaway 4e870334c1 Fix fgets buffer overflow
Obtained from:	OpenBSD
2003-06-27 03:36:50 +00:00

12 lines
523 B
Text

$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';
}