Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a999a3a authored by Herbert Xu's avatar Herbert Xu
Browse files

[CRYPTO] tcrypt: Zero axbuf in the right function



The axbuf buffer is used by test_aead and therefore should be zeroed
there instead of in test_hash.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 866cd902
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++) {
@@ -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) {