Re: [PATCH] crypto: fix potential NULL pointer dereference in skcipher_alloc_sgl()

2013-11-28 Thread Herbert Xu
On Fri, Nov 15, 2013 at 10:31:25AM +0800, Jeff Liu wrote: From: Jie Liu jeff@oracle.com In skcipher_alloc_sgl(), there is a potential null pointer dereference issue to retrieve the last item from ctx-tsgl list if the list is empty. This patch fix it by checking if the list is empty or

[PATCH] crypto: fix potential NULL pointer dereference in skcipher_alloc_sgl()

2013-11-14 Thread Jeff Liu
From: Jie Liu jeff@oracle.com In skcipher_alloc_sgl(), there is a potential null pointer dereference issue to retrieve the last item from ctx-tsgl list if the list is empty. This patch fix it by checking if the list is empty or not at first. Signed-off-by: Jie Liu jeff@oracle.com ---