Skip to content
Commit bfb05d01 authored by Siarhei Siamashka's avatar Siarhei Siamashka Committed by Hans de Goede
Browse files

sunxi: Ensure that 'mksunxiboot' tool produces deterministic output

Currently some uninitialized padding bytes are written to the output
file, as can be confirmed with valgrind:

$ valgrind tools/mksunxiboot spl/u-boot-spl.bin spl/sunxi-spl.bin

==5581== Syscall param write(buf) points to uninitialised byte(s)
==5581==    at 0x4F0F940: __write_nocancel (in /lib64/libc-2.20.so)
==5581==    by 0x400839: main (in /tmp/u-boot/tools/mksunxiboot)
==5581==  Address 0xffeff5d3c is on thread 1's stack
==5581==  in frame #1

, created by main (???)

This patch fixes the problem by clearing the whole structure instead
of just a portion of it.

Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent f88d546f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment