google_bms: add GBMS_CCCM_LIMITS index check

when temperature >= stop charge criteria (55 degC), we set both temp_idx
and vbatt_idx to -1 in msc_logic_soft_jeita -> batt_reset_chg_drv_state
That causes invalid access in batt_calc_charging_speed -> GBMS_CCCM_LIMITS

Add index value check in GBMS_CCCM_LIMITS to prevent invalid access

Bug: 230744011
Signed-off-by: Jenny Ho <[email protected]>
Change-Id: I0eb4637a42c70bd61a65099eee583d4f335da1ac
2 files changed