Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0103fe20 authored by Amitoj Kaur Chawla's avatar Amitoj Kaur Chawla Committed by Greg Kroah-Hartman
Browse files

staging: android: Use devm_kcalloc instead of devm_kzalloc



Replace devm_kzalloc with devm_kcalloc to ensure there are no integer
overflows from the multiplication of a number * sizeof.

The following Coccinelle semantic patch was used to make this change:
//<smpl>
@@
expression dev,E1,E2,E3;
@@
- devm_kzalloc(dev,E1*sizeof(E2),E3)
+ devm_kcalloc(dev,E1,sizeof(E2),E3)
//</smpl>

Signed-off-by: default avatarAmitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9f1c427d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment