]> git.baikalelectronics.ru Git - uboot.git/commit
cmd/pxe.c: Rework initrd and bootargs handling slightly
authorTom Rini <trini@konsulko.com>
Wed, 27 Sep 2017 00:44:32 +0000 (20:44 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 6 Oct 2017 15:28:21 +0000 (11:28 -0400)
commit6cb6026f94db8b9fdbce8fa5384da65007bcfbe2
tree92149ed9436f7883998392f912cfa2a1906ac896
parent66c5d135aaa32be1ae19bfdc8d8001a1068ce3e5
cmd/pxe.c: Rework initrd and bootargs handling slightly

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 <sjg@chromium.org>
Cc: Alexander Graf <agraf@suse.de>
Reported-by: Coverity (CID: 131256)
Signed-off-by: Tom Rini <trini@konsulko.com>
cmd/pxe.c