From: Tom Rini Date: Wed, 2 Dec 2020 16:22:57 -0500 Subject: [PATCH 05/10] setexpr: Split the core logic into its own function In-Reply-To: <20201101211544.3579850-6-sjg@chromium.org> References: <20201101211544.3579850-1-sjg@chromium.org> <20201101211544.3579850-6-sjg@chromium.org> Message-ID: <20201202212257.GZ32272@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 Sun, Nov 01, 2020 at 02:15:39PM -0700, Simon Glass wrote: > At present this function always allocates a large amount of stack, and > selects its own size for buffers. This makes it hard to test the code > for buffer overflow. > > Separate out the inner logic of the substitution so that tests can call > this directly. This will allow checking that the algorithm does not > overflow the buffer. > > Fix up one of the error lines at the same time, since it should be > printing nbuf_size, not data_size. > > Signed-off-by: Simon Glass Applied to u-boot/next, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: