sha1: don't clean local variable i on exit
In this place value of variable i is constant and predictable. No point to clean it. Furthermore, since the value is not used after assignment, compiler will optimize and remove the assignment. This patch fixes a warning from the clang static analyzer.
This commit is contained in:
@@ -234,7 +234,6 @@ void crypto_SHA1_Final(SHA1_CTX* context, uint8_t* digest)
|
||||
}
|
||||
|
||||
/* Wipe variables */
|
||||
i = 0;
|
||||
memset(context->buffer, 0, 64);
|
||||
memset(context->state, 0, 20);
|
||||
memset(context->count, 0, 8);
|
||||
|
||||
Reference in New Issue
Block a user