summaryrefslogtreecommitdiffstats
path: root/include/resolv.h
diff options
context:
space:
mode:
authoravsm <avsm@openbsd.org>2003-06-26 18:35:13 +0000
committeravsm <avsm@openbsd.org>2003-06-26 18:35:13 +0000
commit585be00bb5a82cc81bc871ebc80d819631be9c82 (patch)
treebab9c679fc0e02ebad7a89ed06a3ffe0f11abdbb /include/resolv.h
parentdocument the new attribute __bounded__ (diff)
downloadwireguard-openbsd-585be00bb5a82cc81bc871ebc80d819631be9c82.tar.xz
wireguard-openbsd-585be00bb5a82cc81bc871ebc80d819631be9c82.zip
Mark various standard library functions with the __bounded__ attribute.
You must have an up-to-date gcc for this! deraadt@ ok
Diffstat (limited to 'include/resolv.h')
-rw-r--r--include/resolv.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/include/resolv.h b/include/resolv.h
index 3ff30ac10dd..54cfdb8fc12 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolv.h,v 1.11 2003/06/02 19:34:12 millert Exp $ */
+/* $OpenBSD: resolv.h,v 1.12 2003/06/26 18:35:13 avsm Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -333,13 +333,19 @@ int dn_expand(const u_char *, const u_char *, const u_char *,
char *, int);
int res_init(void);
u_int res_randomid(void);
-int res_query(const char *, int, int, u_char *, int);
-int res_search(const char *, int, int, u_char *, int);
+int res_query(const char *, int, int, u_char *, int)
+ __attribute__((__bounded__(__string__,4,5)));
+int res_search(const char *, int, int, u_char *, int)
+ __attribute__((__bounded__(__string__,4,5)));
int res_querydomain(const char *, const char *, int, int,
- u_char *, int);
+ u_char *, int)
+ __attribute__((__bounded__(__string__,5,6)));
int res_mkquery(int, const char *, int, int, const u_char *, int,
- const u_char *, u_char *, int);
-int res_send(const u_char *, int, u_char *, int);
+ const u_char *, u_char *, int)
+ __attribute__((__bounded__(__string__,5,6)))
+ __attribute__((__bounded__(__string__,8,9)));
+int res_send(const u_char *, int, u_char *, int)
+ __attribute__((__bounded__(__string__,3,4)));
int res_isourserver(const struct sockaddr_in *);
int res_nameinquery(const char *, int, int,
const u_char *, const u_char *);