summaryrefslogtreecommitdiffstats
path: root/storage/maria/libmarias3/src/assume_role.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
commit86fbb58c3ac0865482819c10a3e81f2eea001c36 (patch)
tree28c9e526ea739c6f9b89e36115e1e2698bddf981 /storage/maria/libmarias3/src/assume_role.c
parentReleasing progress-linux version 1:10.11.6-2~progress7.99u1. (diff)
downloadmariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.tar.xz
mariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.zip
Merging upstream version 1:10.11.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'storage/maria/libmarias3/src/assume_role.c')
-rw-r--r--storage/maria/libmarias3/src/assume_role.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/maria/libmarias3/src/assume_role.c b/storage/maria/libmarias3/src/assume_role.c
index 255b1eca..4135504c 100644
--- a/storage/maria/libmarias3/src/assume_role.c
+++ b/storage/maria/libmarias3/src/assume_role.c
@@ -373,7 +373,7 @@ build_assume_role_request_headers(CURL *curl, struct curl_slist **head,
time_t now;
struct tm tmp_tm;
char headerbuf[3072];
- char secrethead[45];
+ char secrethead[MAX_S3_SECRET_LENGTH + S3_SECRET_EXTRA_LENGTH];
char date[9];
char sha256hash[65];
char post_hash[65];
@@ -445,7 +445,7 @@ build_assume_role_request_headers(CURL *curl, struct curl_slist **head,
// User signing key hash
// Date hashed using AWS4:secret_key
- snprintf(secrethead, sizeof(secrethead), "AWS4%.*s", 40, secret);
+ snprintf(secrethead, sizeof(secrethead), "AWS4%.*s", MAX_S3_SECRET_LENGTH, secret);
strftime(headerbuf, sizeof(headerbuf), "%Y%m%d", &tmp_tm);
hmac_sha256((uint8_t *)secrethead, strlen(secrethead), (uint8_t *)headerbuf,
strlen(headerbuf), hmac_hash);