summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbitblt <bitblt@openbsd.org>1997-03-16 22:15:20 +0000
committerbitblt <bitblt@openbsd.org>1997-03-16 22:15:20 +0000
commitf8f5f753f23eca7377ad76c29cdc7af70e8401c6 (patch)
treeda2430688f59329aad3fcc2341ccb144a00bc31c
parentSlight rearrangement, addition of ROMP values. (diff)
downloadwireguard-openbsd-f8f5f753f23eca7377ad76c29cdc7af70e8401c6.tar.xz
wireguard-openbsd-f8f5f753f23eca7377ad76c29cdc7af70e8401c6.zip
Added NetBSD fix for overflow. Probably not exploitable because it's a static.
-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);
}