|
@@ -336,7 +336,7 @@ static int crypto_authenc_genicv(struct aead_request *req, u8 *iv,
|
|
|
cryptlen += ivsize;
|
|
|
}
|
|
|
|
|
|
- if (sg_is_last(assoc)) {
|
|
|
+ if (req->assoclen && sg_is_last(assoc)) {
|
|
|
authenc_ahash_fn = crypto_authenc_ahash;
|
|
|
sg_init_table(asg, 2);
|
|
|
sg_set_page(asg, sg_page(assoc), assoc->length, assoc->offset);
|
|
@@ -490,7 +490,7 @@ static int crypto_authenc_iverify(struct aead_request *req, u8 *iv,
|
|
|
cryptlen += ivsize;
|
|
|
}
|
|
|
|
|
|
- if (sg_is_last(assoc)) {
|
|
|
+ if (req->assoclen && sg_is_last(assoc)) {
|
|
|
authenc_ahash_fn = crypto_authenc_ahash;
|
|
|
sg_init_table(asg, 2);
|
|
|
sg_set_page(asg, sg_page(assoc), assoc->length, assoc->offset);
|