Skip to content

Commit

Permalink
Reduce scope of assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed May 1, 2014
1 parent a67e9b8 commit 187bb77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/rlm_eap/libeap/fips186prf.c
Expand Up @@ -133,7 +133,7 @@ void fips186_2prf(uint8_t mk[20], uint8_t finalkey[160])
/* b. w_0 = SHA1(XVAL) */
fr_SHA1Init(&context);

memset(zeros, 0, sizeof(zeros));
memset(zeros + 20, 0, sizeof(zeros) - 20);
memcpy(zeros, xval.p, 20);
#ifndef WITH_OPENSSL_SHA1
fr_SHA1Transform(context.state, zeros);
Expand All @@ -152,7 +152,7 @@ void fips186_2prf(uint8_t mk[20], uint8_t finalkey[160])
/* e. w_1 = SHA1(XVAL) */
fr_SHA1Init(&context);

memset(zeros, 0, sizeof(zeros));
memset(zeros + 20, 0, sizeof(zeros) - 20);
memcpy(zeros, xval.p, 20);
#ifndef WITH_OPENSSL_SHA1
fr_SHA1Transform(context.state, zeros);
Expand Down

0 comments on commit 187bb77

Please sign in to comment.