From f8f5f753f23eca7377ad76c29cdc7af70e8401c6 Mon Sep 17 00:00:00 2001 From: bitblt Date: Sun, 16 Mar 1997 22:15:20 +0000 Subject: [PATCH] Added NetBSD fix for overflow. Probably not exploitable because it's a static. --- lib/libterm/tgoto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libterm/tgoto.c b/lib/libterm/tgoto.c index a859ce165d4..d678c06724a 100644 --- a/lib/libterm/tgoto.c +++ b/lib/libterm/tgoto.c @@ -210,6 +210,6 @@ setwhich: goto toohard; } } - strcpy(dp, added); + strncpy(dp, added, sizeof (result) - (dp - result) - 1); return (result); } -- 2.20.1