crypto: assert that qcrypto_hash_digest_len is in range
Otherwise unintended results could happen. For example, Coverity reports a division by zero in qcrypto_afsplit_hash. While this cannot really happen, it shows that the contract of qcrypto_hash_digest_len can be improved. Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
Showing
想要评论请 注册 或 登录