diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/acme-client/json.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/acme-client/json.c b/usr.sbin/acme-client/json.c index a57820b3132..737275862b6 100644 --- a/usr.sbin/acme-client/json.c +++ b/usr.sbin/acme-client/json.c @@ -1,4 +1,4 @@ -/* $Id: json.c,v 1.14 2019/06/18 18:50:07 florian Exp $ */ +/* $Id: json.c,v 1.15 2020/01/22 06:24:43 tedu Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -459,12 +459,13 @@ json_parse_order(struct jsmnn *n, struct order *order) if ((array = json_getarray(n, "authorizations")) == NULL) goto err; - if ((order->authsz = array->fields) > 0) { + if (array->fields > 0) { order->auths = calloc(sizeof(*order->auths), order->authsz); if (order->auths == NULL) { warn("malloc"); goto err; } + order->authsz = array->fields; } for (i = 0; i < array->fields; i++) { |