Browse Source

clean stack properly

Steffen Jaeckel 8 years ago
parent
commit
2858373e2e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/hashes/chc/chc.c

+ 2 - 2
src/hashes/chc/chc.c

@@ -147,11 +147,11 @@ static int chc_compress(hash_state *md, unsigned char *buf)
    for (x = 0; x < cipher_blocksize; x++) {
        md->chc.state[x] ^= T[0][x] ^ T[1][x];
    }
-   XFREE(key);
 #ifdef LTC_CLEAN_STACK
    zeromem(T, sizeof(T));
-   zeromem(&key, sizeof(key));
+   zeromem(key, sizeof(*key));
 #endif
+   XFREE(key);
    return CRYPT_OK;
 }