From c18ff0862f1af4c4dadd6eb67dbc871e65518a15 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Aug 2026 22:22:53 +0000 Subject: [PATCH] Fix CodeQL alert #229 loop counter type width Co-authored-by: polhenarejos <55573252+polhenarejos@users.noreply.github.com> --- src/openpgp/openpgp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openpgp/openpgp.c b/src/openpgp/openpgp.c index fbfd78a..73d1e72 100644 --- a/src/openpgp/openpgp.c +++ b/src/openpgp/openpgp.c @@ -231,7 +231,7 @@ static void restore_pw_status_limits(void) { uint8_t status[64]; bool changed = false; memcpy(status, file_get_data(pw_status), status_len); - for (uint8_t i = 1; i < 4 && i < status_len; i++) { + for (uint16_t i = 1; i < 4 && i < status_len; i++) { if (status[i] != 127) { status[i] = 127; changed = true;