Skip to content
Commit 29b37f42 authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: authenc - Fix zero-length IV crash



As it is if an algorithm with a zero-length IV is used (e.g.,
NULL encryption) with authenc, authenc may generate an SG entry
of length zero, which will trigger a BUG check in the hash layer.

This patch fixes it by skipping the IV SG generation if the IV
size is zero.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 5393f780
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment