-/* $OpenBSD: relay_http.c,v 1.81 2021/03/24 20:59:54 benno Exp $ */
+/* $OpenBSD: relay_http.c,v 1.82 2021/07/25 20:31:41 benno Exp $ */
/*
* Copyright (c) 2006 - 2016 Reyk Floeter <reyk@openbsd.org>
case KEY_OPTION_STRIP:
nstrip = strtonum(kv->kv_value, 0, INT_MAX, NULL);
if (kv->kv_type == KEY_TYPE_PATH) {
- if (kv_setkey(match,
+ if (kv_setkey(match, "%s",
server_root_strip(match->kv_key,
nstrip)) == -1)
goto fail;
if ((ptr = relay_expand_http(cre, kp->kv_value, buf,
sizeof(buf))) == NULL)
goto fail;
- if (kv_set(match, ptr) == -1)
+ if (kv_set(match, "%s", ptr) == -1)
goto fail;
}
-/* $OpenBSD: relayd.h,v 1.267 2021/04/20 21:11:56 dv Exp $ */
+/* $OpenBSD: relayd.h,v 1.268 2021/07/25 20:31:41 benno Exp $ */
/*
* Copyright (c) 2006 - 2016 Reyk Floeter <reyk@openbsd.org>
int accept_reserve(int, struct sockaddr *, socklen_t *, int,
volatile int *);
struct kv *kv_add(struct kvtree *, char *, char *, int);
-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 *);