From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sat, 24 Oct 2020 10:51:16 -0400 Subject: [PATCH 1/2] power: regulator: gpio-regulator: protect count value In-Reply-To: <20200910161817.27535-1-patrick.delaunay@st.com> References: <20200910161817.27535-1-patrick.delaunay@st.com> Message-ID: <20201024145116.GZ14816@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 * 2 = 4 > instead of 8 previously. > > The value of the "count" variable is limited by the third parameter of > fdtdec_get_int_array_count. > > Signed-off-by: Patrick Delaunay > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: