Skip to content

Commit

Permalink
[CRYPTO] tcrypt: Zero axbuf in the right function
Browse files Browse the repository at this point in the history
The axbuf buffer is used by test_aead and therefore should be zeroed
there instead of in test_hash.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Herbert Xu committed Jan 10, 2008
1 parent 866cd90 commit 2a999a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/tcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ static void test_hash(char *algo, struct hash_testvec *template,

/* setup the dummy buffer first */
memset(xbuf, 0, XBUFSIZE);
memset(axbuf, 0, XBUFSIZE);

j = 0;
for (i = 0; i < tcount; i++) {
Expand Down Expand Up @@ -350,6 +349,7 @@ static void test_aead(char *algo, int enc, struct aead_testvec *template,

printk(KERN_INFO "\ntesting %s %s across pages (chunking)\n", algo, e);
memset(xbuf, 0, XBUFSIZE);
memset(axbuf, 0, XBUFSIZE);

for (i = 0, j = 0; i < tcount; i++) {
if (aead_tv[i].np) {
Expand Down

0 comments on commit 2a999a3

Please sign in to comment.