diff options
author | deraadt <> | 2004-03-10 01:17:45 +0000 |
---|---|---|
committer | deraadt <> | 2004-03-10 01:17:45 +0000 |
commit | a272f1c344b471ed9deede70f7e22a58d2d8ecd4 (patch) | |
tree | 836e4ea66c58dfc4cfb39ba830db0d4b03bb04f3 /src/regress/lib | |
parent | ea183c817a5d15761fe03efdb388a1219b20c516 (diff) | |
download | openbsd-a272f1c344b471ed9deede70f7e22a58d2d8ecd4.tar.gz openbsd-a272f1c344b471ed9deede70f7e22a58d2d8ecd4.tar.bz2 openbsd-a272f1c344b471ed9deede70f7e22a58d2d8ecd4.zip |
toast strcpy
Diffstat (limited to 'src/regress/lib')
-rw-r--r-- | src/regress/lib/libc/alloca/alloca.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/regress/lib/libc/alloca/alloca.c b/src/regress/lib/libc/alloca/alloca.c index d9573e2f54..54fa90edae 100644 --- a/src/regress/lib/libc/alloca/alloca.c +++ b/src/regress/lib/libc/alloca/alloca.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: alloca.c,v 1.6 2003/09/02 23:52:16 david Exp $ */ | 1 | /* $OpenBSD: alloca.c,v 1.7 2004/03/10 01:17:45 deraadt Exp $ */ |
2 | 2 | ||
3 | /* Written by Michael Shalayeff, 2003, Public Domain. */ | 3 | /* Written by Michael Shalayeff, 2003, Public Domain. */ |
4 | 4 | ||
@@ -12,10 +12,10 @@ main(int argc, char *argv[]) | |||
12 | char *q, *p; | 12 | char *q, *p; |
13 | 13 | ||
14 | p = alloca(41); | 14 | p = alloca(41); |
15 | strcpy(p, "hellow world"); | 15 | strlcpy(p, "hellow world", 41); |
16 | 16 | ||
17 | q = alloca(53); | 17 | q = alloca(53); |
18 | strcpy(q, "hellow world"); | 18 | strlcpy(q, "hellow world", 53); |
19 | 19 | ||
20 | exit(strcmp(p, q)); | 20 | exit(strcmp(p, q)); |
21 | } | 21 | } |