summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-22 21:53:37 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2022-09-22 21:53:37 +0800
commit02ac0da7e93b9ac19f8c7cf9a84558b192375754 (patch)
treeec93786b19f89f2494a1407ab40527be551199e7
parent43b153677df7f3c9da39a0830cdd6a918866d424 (diff)
Reuse api_key_len
-rw-r--r--shopify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shopify.c b/shopify.c
index 469a0b6..6c5175f 100644
--- a/shopify.c
+++ b/shopify.c
@@ -411,7 +411,7 @@ static enum MHD_Result handle_request(void *cls, struct MHD_Connection *con,
curl_easy_setopt(curl, CURLOPT_URL, url);
static const char *post_tmpl
= "client_id=%s&client_secret=%s&code=%s";
- char post[strlen(post_tmpl) - strlen("%s") * 3 + strlen(api_key)
+ char post[strlen(post_tmpl) - strlen("%s") * 3 + api_key_len
+ api_secret_key_len + strlen(code) + 1];
sprintf(post, post_tmpl, api_key, api_secret_key, code);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, post);