From: Tom Rini Date: Sat, 7 Oct 2017 09:09:13 -0400 Subject: [U-Boot] cmd/pxe.c: Rework initrd and bootargs handling slightly In-Reply-To: <1506473072-22411-1-git-send-email-trini@konsulko.com> References: <1506473072-22411-1-git-send-email-trini@konsulko.com> Message-ID: <20171007130913.GG25966@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 Tue, Sep 26, 2017 at 08:44:32PM -0400, Tom Rini wrote: > For the initrd portion of handling our bootm arguments we do not have a > sufficiently long enough buffer for some improbable 64bit cases. Expand > this buffer to allow for a 64bit address and almost 256MB initrd to be > used. Make use of strncpy/strncat when constructing the values here > since we know what the worst case valid values are, length wise. > > Similarly for bootargs themselves, we need to make use of strlen/sizeof > and strncpy/strncat to ensure that we don't overflow bootargs itself. > > Cc: Simon Glass > Cc: Alexander Graf > Reported-by: Coverity (CID: 131256) > Signed-off-by: Tom Rini Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: