What changed, and why it matters
This commit fixes a simple C compiler error in the account manager. A variable named validCount and a loop counter i were used but never declared, and an indentation/whitespace mistake was corrected. There is no security-relevant change visible in the diff.
No security action required; treat as a normal build/compilation fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds two missing local variable declarations (uint8_t validCount, i) and fixes whitespace/indentation around an if statement in AccountsDataCheck(). The logic of the function is unchanged: it still reads IV and key pages, checks entropy, and increments validCount. This is a build-fix/cosmetic patch, not a security fix.
Changed components
src/managers/account_manager.cInspect captured patch +3 / −3
diff --git a/src/managers/account_manager.c b/src/managers/account_manager.c
index 73b9794..d166373 100644
--- a/src/managers/account_manager.c
+++ b/src/managers/account_manager.c
@@ -602,16 +602,16 @@ int32_t DestroyAccount(uint8_t accountIndex)
void AccountsDataCheck(void)
{
int32_t ret;
- uint8_t data[32], accountIndex;
+ uint8_t data[32], accountIndex, validCount, i;
for (accountIndex = 0; accountIndex < 3; accountIndex++) {
+ validCount = 0;
// for se gen1, check each account start
ret = SE_HmacEncryptRead(data, accountIndex * PAGE_NUM_PER_ACCOUNT + PAGE_INDEX_IV);
CHECK_ERRCODE_BREAK("read iv", ret);
- if (CheckEntropy(data, 32)) {
+ if (CheckEntropy(data, 32)) {
validCount++;
}
-
// for se gen1, check each account key to check validity
ret = SE_HmacEncryptRead(data, accountIndex * PAGE_NUM_PER_ACCOUNT + PAGE_INDEX_KEY_PIECE);
CHECK_ERRCODE_BREAK("read key piece", ret);
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.