diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-04-02 16:35:14 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-04-02 16:35:14 +0200 |
commit | 8ebb4cda07f92f217f3388eaccabf9589fdb0800 (patch) | |
tree | dd6c7d80b604863697d7cfd5e4dfd505673e423b /src/exchange-lib | |
parent | 40a64e8f0c4da9d99f1352004b572052da1cecb7 (diff) | |
download | exchange-8ebb4cda07f92f217f3388eaccabf9589fdb0800.tar.xz |
fix NULL termination of fee list
Diffstat (limited to 'src/exchange-lib')
-rw-r--r-- | src/exchange-lib/exchange_api_wire.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/exchange-lib/exchange_api_wire.c b/src/exchange-lib/exchange_api_wire.c index 12789b2bc..6537e6c10 100644 --- a/src/exchange-lib/exchange_api_wire.c +++ b/src/exchange-lib/exchange_api_wire.c @@ -167,8 +167,10 @@ parse_fees (json_t *fees) free_fees (fm); return NULL; } - if (idx < len) + if (idx + 1 < len) wa->next = &fe->fee_list[idx + 1]; + else + wa->next = NULL; } } return fm; |