Added NetBSD fix for overflow. Probably not exploitable because it's a static.
authorbitblt <bitblt@openbsd.org>
Sun, 16 Mar 1997 22:15:20 +0000 (22:15 +0000)
committerbitblt <bitblt@openbsd.org>
Sun, 16 Mar 1997 22:15:20 +0000 (22:15 +0000)
lib/libterm/tgoto.c

index a859ce1..d678c06 100644 (file)
@@ -210,6 +210,6 @@ setwhich:
                        goto toohard;
                }
        }
-       strcpy(dp, added);
+       strncpy(dp, added, sizeof (result) - (dp - result) - 1);
        return (result);
 }