summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnil Madhavapeddy <avsm@cvs.openbsd.org>2004-06-20 17:47:08 +0000
committerAnil Madhavapeddy <avsm@cvs.openbsd.org>2004-06-20 17:47:08 +0000
commit73ccfbaa117160675169345630b3cbe6365ee6ba (patch)
tree6123922b8455b1197550731036952f860386cf1b
parent425108837a5d8c50307bf676f11072d8541fbbd5 (diff)
add bounds check for src pointer in bcopy(3) as well as dest pointer,
noticed by millert@
-rw-r--r--include/string.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/string.h b/include/string.h
index 31e70d89369..c33598079cd 100644
--- a/include/string.h
+++ b/include/string.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: string.h,v 1.13 2003/08/01 17:38:33 avsm Exp $ */
+/* $OpenBSD: string.h,v 1.14 2004/06/20 17:47:07 avsm Exp $ */
/* $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ */
/*-
@@ -90,6 +90,7 @@ size_t strxfrm(char *, const char *, size_t)
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
int bcmp(const void *, const void *, size_t);
void bcopy(const void *, void *, size_t)
+ __attribute__ ((__bounded__(__buffer__,1,3)))
__attribute__ ((__bounded__(__buffer__,2,3)));
void bzero(void *, size_t)
__attribute__ ((__bounded__(__buffer__,1,2)));