Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/ssp off by one
details: https://anonhg.NetBSD.org/src/rev/89d58eef7469
branches: trunk
changeset: 760146:89d58eef7469
user: christos <christos%NetBSD.org@localhost>
date: Tue Dec 28 16:19:25 2010 +0000
description:
off by one
diffstat:
lib/libc/ssp/strcpy_chk.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 130eed30dbbb -r 89d58eef7469 lib/libc/ssp/strcpy_chk.c
--- a/lib/libc/ssp/strcpy_chk.c Tue Dec 28 16:18:46 2010 +0000
+++ b/lib/libc/ssp/strcpy_chk.c Tue Dec 28 16:19:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strcpy_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $ */
+/* $NetBSD: strcpy_chk.c,v 1.5 2010/12/28 16:19:25 christos Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: strcpy_chk.c,v 1.4 2008/04/28 20:23:00 martin Exp $");
+__RCSID("$NetBSD: strcpy_chk.c,v 1.5 2010/12/28 16:19:25 christos Exp $");
/*LINTLIBRARY*/
@@ -43,7 +43,7 @@
{
size_t len = strlen(src);
- if (len > slen)
+ if (len >= slen)
__chk_fail();
return memcpy(dst, src, len + 1);
Home |
Main Index |
Thread Index |
Old Index