Skip to content
Commit fb4d83f2 authored by Pi-Hsun Shih's avatar Pi-Hsun Shih Committed by Zhang Rui
Browse files

thermal: mtk: Allocate enough space for mtk_thermal.



The mtk_thermal struct contains a 'struct mtk_thermal_bank banks[];',
but the allocation only allocates sizeof(struct mtk_thermal) bytes,
which cause out of bound access with the ->banks[] member. Change it to
a fixed size array instead.

Signed-off-by: default avatarPi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent e0fda737
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment