Re: [PATCH] crypto: algif_hash - correctly handle algos without state

2016-02-27 Thread Herbert Xu
On Tue, Feb 23, 2016 at 12:01:56PM -0500, Sasha Levin wrote: > Algorithms without state will cause the creation of a 0 sized array, which > is undefined outside of structs. > > Signed-off-by: Sasha Levin Actually the state size should never be zero and we check it upon algorithm registration, so

[PATCH] crypto: algif_hash - correctly handle algos without state

2016-02-23 Thread Sasha Levin
Algorithms without state will cause the creation of a 0 sized array, which is undefined outside of structs. Signed-off-by: Sasha Levin --- crypto/algif_hash.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c index 68a5cea..a9f923f 1