diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-01-14 04:31:34 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-01-14 04:31:34 +0000 |
commit | 5661a264c569b0819105b9c102c69dba73a24687 (patch) | |
tree | 1333c0b734874679b3bd3f72d77ee2f3a6c83cdb | |
parent | 33acb63e496ca13ecb4bb8f63806997ffa7e1f6d (diff) |
bounds checking for copystr, copyin and copyinstr;
tested by moritz@ otto@ deraadt@, ok deraadt@
-rw-r--r-- | sys/sys/systm.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 5d3dd639497..8213ddaac14 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: systm.h,v 1.65 2004/11/28 02:11:33 deraadt Exp $ */ +/* $OpenBSD: systm.h,v 1.66 2005/01/14 04:31:33 djm Exp $ */ /* $NetBSD: systm.h,v 1.50 1996/06/09 04:55:09 briggs Exp $ */ /*- @@ -201,10 +201,13 @@ void *memmove(void *, const void *, size_t) void *memset(void *, int, size_t) __attribute__ ((__bounded__(__buffer__,1,3))); -int copystr(const void *, void *, size_t, size_t *); -int copyinstr(const void *, void *, size_t, size_t *); +int copystr(const void *, void *, size_t, size_t *) + __attribute__ ((__bounded__(__string__,2,3))); +int copyinstr(const void *, void *, size_t, size_t *) + __attribute__ ((__bounded__(__string__,2,3))); int copyoutstr(const void *, void *, size_t, size_t *); -int copyin(const void *, void *, size_t); +int copyin(const void *, void *, size_t) + __attribute__ ((__bounded__(__buffer__,2,3))); int copyout(const void *, void *, size_t); struct timeval; |