Re: [PATCH 1/2] power: regulator: gpio-regulator: protect count value

2020-10-24 Thread Tom Rini
On Thu, Sep 10, 2020 at 06:18:16PM +0200, Patrick Delaunay wrote: > Update the size of states_array to avoid overflow for > dev_pdata->voltages[j] and dev_pdata->states[j]. > > As the size of array is GPIO_REGULATOR_MAX_STATES, the size of > states_array is limited by GPIO_REGULATOR_MAX_STATES *

Re: [PATCH 1/2] power: regulator: gpio-regulator: protect count value

2020-09-16 Thread Simon Glass
On Thu, 10 Sep 2020 at 10:18, Patrick Delaunay wrote: > > Update the size of states_array to avoid overflow for > dev_pdata->voltages[j] and dev_pdata->states[j]. > > As the size of array is GPIO_REGULATOR_MAX_STATES, the size of > states_array is limited by GPIO_REGULATOR_MAX_STATES * 2 = 4 >

[PATCH 1/2] power: regulator: gpio-regulator: protect count value

2020-09-10 Thread Patrick Delaunay
Update the size of states_array to avoid overflow for dev_pdata->voltages[j] and dev_pdata->states[j]. As the size of array is GPIO_REGULATOR_MAX_STATES, the size of states_array is limited by GPIO_REGULATOR_MAX_STATES * 2 = 4 instead of 8 previously. The value of the "count" variable is limited