Age | Commit message (Collapse) | Author |
|
On a second and third look, a recent patch seems to be writing to the
wrong place - updating offsets from the address of the pointer instead
of what the pointer points to.
Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 2d1b2ac13fe ("tool: ifwitool: Fix buffer overflow")
Acked-by: Sean Anderson <seanga2@gmail.com>
|
|
An incorrect 1st parameter is passed to the fix_member()
function. Should use a pointer to the beginning of the parent structure
(bpdt or subpart_dir, because are boxed), not to their fields. Otherwise,
this leads to an overrun of the structure boundary, since in the
fix_member() function, an 'offset' is made, relative to the 1st argument,
which itself is an 'offset' from the beginning of the structure.
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
This will cause the local_time pointer is passed as the 4th argument
to function strftime() to also point to NULL. This result in a
segmentation fault. Thus, it's necessary to add a check of the local_time
pointer to NULL.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
The ALIGN code is need by many files who need handle structure or image
align, so move the macro to imagetool.h file.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
Reviewed-by: Tom Rini <trini@konsulko.com>
|
|
Some compilers may provide __packed define for us.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
|
Some Intel SoCs from about 2016 boot using an internal microcontroller via
an 'IFWI' image. This is a special format which can hold firmware images.
In U-Boot's case it holds u-boot-tpl.bin.
Add this tool, taken from coreboot, so that we can build bootable images
on apollolake SoCs.
This tool itself has no tests. Some amount of coverage will be provided by
the binman tests that use it, so enable building the tool on sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
|