summaryrefslogtreecommitdiffstats
path: root/aclk
diff options
context:
space:
mode:
authorStelios Fragkakis <52996999+stelfrag@users.noreply.github.com>2020-03-18 21:33:10 +0200
committerGitHub <noreply@github.com>2020-03-18 21:33:10 +0200
commit28d82faf7f0460b4d38ed2b83ed3cea1ff5a7b10 (patch)
tree71332526f6e45cf3bdd3990201c8fa800839bb47 /aclk
parentb9e77822fdcd354f07ca82a238ad5807bab29753 (diff)
Fixed JSON parsing (#8426)
* Fixed an issue with the internal JSON parser which made it fail to parse ACLK challenge/response related payloads
Diffstat (limited to 'aclk')
-rw-r--r--aclk/aclk_lws_https_client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/aclk/aclk_lws_https_client.c b/aclk/aclk_lws_https_client.c
index c07e185baa..f22d425d22 100644
--- a/aclk/aclk_lws_https_client.c
+++ b/aclk/aclk_lws_https_client.c
@@ -35,9 +35,10 @@ static int simple_https_client_callback(struct lws *wsi, enum lws_callback_reaso
return -1;
}
ptr = perconn_data->data;
- n = perconn_data->data_size;
+ n = perconn_data->data_size - 1;
if (lws_http_client_read(wsi, &ptr, &n) < 0)
return -1;
+ ptr[n] = '\0';
return 0;
case LWS_CALLBACK_WSI_DESTROY:
debug(D_ACLK, "LWS_CALLBACK_WSI_DESTROY");