Skip to content

Commit 6dde002

Browse files
committed
fix(aws): Fix potential overflow in md_lifetime_ms on 32‑bit time_t
Signed-off-by: Arbin <[email protected]>
1 parent 862a4ec commit 6dde002

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/aws/flb_aws_msk_iam.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ static void oauthbearer_token_refresh_cb(rd_kafka_t *rk,
555555
* valid when the callback is eventually triggered, allowing successful token regeneration.
556556
*/
557557
now = time(NULL);
558-
md_lifetime_ms = (now + MSK_IAM_TOKEN_LIFETIME_SECONDS) * 1000;
558+
md_lifetime_ms = ((int64_t)now + MSK_IAM_TOKEN_LIFETIME_SECONDS) * 1000;
559559

560560
err = rd_kafka_oauthbearer_set_token(rk,
561561
payload,

0 commit comments

Comments
 (0)