summaryrefslogtreecommitdiff
path: root/usr.sbin/httpd/httpd.h
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2015-07-31 00:10:52 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2015-07-31 00:10:52 +0000
commitc28811ed4562d17becfc3a5c228e2fdf7f636588 (patch)
treecd9389d8a989b8385d4b8803bd2fb7e9f2a1c7db /usr.sbin/httpd/httpd.h
parent208fef22682ab57ed435c02950adb612812c259c (diff)
repair hsts header output, wrong format strings caused broken
Strict-Transport-Security headers. Add __format__ attribute to kv_set() and kv_setkey() to make it easier to spot such problems. Found by and fix from Donovan Watteau <tsoomi -AT- gmail -DOT- com>, thanks for your help. ok deraadt@
Diffstat (limited to 'usr.sbin/httpd/httpd.h')
-rw-r--r--usr.sbin/httpd/httpd.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/httpd/httpd.h b/usr.sbin/httpd/httpd.h
index 4060f3956e5..aafc4f49883 100644
--- a/usr.sbin/httpd/httpd.h
+++ b/usr.sbin/httpd/httpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: httpd.h,v 1.94 2015/07/29 22:03:41 reyk Exp $ */
+/* $OpenBSD: httpd.h,v 1.95 2015/07/31 00:10:51 benno Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -635,8 +635,8 @@ u_int32_t prefixlen2mask(u_int8_t);
int accept_reserve(int, struct sockaddr *, socklen_t *, int,
volatile int *);
struct kv *kv_add(struct kvtree *, char *, char *);
-int kv_set(struct kv *, char *, ...);
-int kv_setkey(struct kv *, char *, ...);
+int kv_set(struct kv *, char *, ...) __attribute__((__format__ (printf, 2, 3)));
+int kv_setkey(struct kv *, char *, ...) __attribute__((__format__ (printf, 2, 3)));
void kv_delete(struct kvtree *, struct kv *);
struct kv *kv_extend(struct kvtree *, struct kv *, char *);
void kv_purge(struct kvtree *);