Re: [Qemu-devel] [PATCH] crypto: assert that qcrypto_hash_digest_len is in range

2016-05-20 Thread Daniel P. Berrange
On Fri, May 20, 2016 at 09:52:36AM -0600, Eric Blake wrote: > On 05/20/2016 03:09 AM, Paolo Bonzini wrote: > > 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 >

Re: [Qemu-devel] [PATCH] crypto: assert that qcrypto_hash_digest_len is in range

2016-05-20 Thread Eric Blake
On 05/20/2016 03:09 AM, Paolo Bonzini wrote: > 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. > > Signed-off-by: Paol

[Qemu-devel] [PATCH] crypto: assert that qcrypto_hash_digest_len is in range

2016-05-20 Thread Paolo Bonzini
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. Signed-off-by: Paolo Bonzini --- crypto/hash.c | 4 +--- 1 file changed, 1