]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove unnecessary cleanup assignment in SHA1Final()
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 28 Dec 2015 16:12:03 +0000 (18:12 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 28 Dec 2015 16:12:03 +0000 (18:12 +0200)
This makes some static analyzers complain about stored value never being
read. While it is good to clear some other temporary variables, this
local variable i has no security private information (it has a fixed
value of 20 here) and trying to clear it to 0 does not add any value.
Remove that part of the "wipe variables" to avoid one useless static
analyzer complaint.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/crypto/sha1-internal.c

index f6658e6eeed416ccea5e0090b7046b127196887d..ffcba66af652f0dea44176c1ffd96452cadbd47f 100644 (file)
@@ -297,7 +297,6 @@ void SHA1Final(unsigned char digest[20], SHA1_CTX* context)
                         255);
        }
        /* Wipe variables */
-       i = 0;
        os_memset(context->buffer, 0, 64);
        os_memset(context->state, 0, 20);
        os_memset(context->count, 0, 8);