summaryrefslogtreecommitdiff
path: root/lib/libterm/tgoto.c
diff options
context:
space:
mode:
authorbitblt <bitblt@cvs.openbsd.org>1997-03-16 22:15:21 +0000
committerbitblt <bitblt@cvs.openbsd.org>1997-03-16 22:15:21 +0000
commit823fdd4548533357bc030f63166989747c076828 (patch)
treefc93f208af2acbef54cd1d74d3a1e06ace4908d1 /lib/libterm/tgoto.c
parent55cedf1a4920eeb54ebfe2b79f3f12f637695b50 (diff)
Added NetBSD fix for overflow. Probably not exploitable because it's a static.
Diffstat (limited to 'lib/libterm/tgoto.c')
-rw-r--r--lib/libterm/tgoto.c2
1 files changed, 1 insertions, 1 deletions
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);
}