diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2020-01-22 22:25:23 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2020-01-22 22:25:23 +0000 |
commit | 889a96729b40be600410a01250ba4bb4f521ce2f (patch) | |
tree | 267f4fc0f74b68cf5dd6af2572de005e79efc3d3 /usr.sbin/acme-client/json.c | |
parent | 37e298ff00500de3cb74bc42a1db6f8f9efa0dfb (diff) |
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/json.c')
-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; |