diff options
author | tedu <tedu@openbsd.org> | 2020-01-22 22:25:22 +0000 |
---|---|---|
committer | tedu <tedu@openbsd.org> | 2020-01-22 22:25:22 +0000 |
commit | 1de67d341f75d4fd5f746e5ba8627ed24df2ec8f (patch) | |
tree | 3a116a9eaaed773bef6d875375f0aa5eb9e02b8c /usr.sbin/acme-client | |
parent | Wire up the TLSv1.3 server. (diff) | |
download | wireguard-openbsd-1de67d341f75d4fd5f746e5ba8627ed24df2ec8f.tar.xz wireguard-openbsd-1de67d341f75d4fd5f746e5ba8627ed24df2ec8f.zip |
use the correct length to allocate the right amount, broken by previous.
noticed by Matthew Martin
ok deraadt
Diffstat (limited to 'usr.sbin/acme-client')
-rw-r--r-- | usr.sbin/acme-client/json.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/acme-client/json.c b/usr.sbin/acme-client/json.c index 737275862b6..36c7be4c988 100644 --- a/usr.sbin/acme-client/json.c +++ b/usr.sbin/acme-client/json.c @@ -1,4 +1,4 @@ -/* $Id: json.c,v 1.15 2020/01/22 06:24:43 tedu Exp $ */ +/* $Id: json.c,v 1.16 2020/01/22 22:25:22 tedu Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -460,7 +460,7 @@ json_parse_order(struct jsmnn *n, struct order *order) goto err; if (array->fields > 0) { - order->auths = calloc(sizeof(*order->auths), order->authsz); + order->auths = calloc(sizeof(*order->auths), array->fields); if (order->auths == NULL) { warn("malloc"); goto err; |