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

Commit 9c8545b7 authored by Prasad Sodagudi's avatar Prasad Sodagudi
Browse files

msm: clock-a7: fix memory corruption due to out of boundary write



Out of bounds memory write is seen while reading the "qcom,speed-bin"
property from DTSI. Correct the memory allocation size to fix this
issue.

CRs-Fixed: 594553
Change-Id: Ica250132e9139b874102a7d6c388a76517dea6c3
Signed-off-by: default avatarPrasad Sodagudi <psodagud@codeaurora.org>
parent 3ae282c3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -193,7 +193,8 @@ static int of_get_fmax_vdd_class(struct platform_device *pdev, struct clk *c,
	if (!c->fmax)
		return -ENOMEM;

	array = devm_kzalloc(&pdev->dev, prop_len * sizeof(u32), GFP_KERNEL);
	array = devm_kzalloc(&pdev->dev,
			prop_len * sizeof(u32) * 2, GFP_KERNEL);
	if (!array)
		return -ENOMEM;