git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b891826
)
test: cmd/mbr: pass correct buffer size to init_write_buffers
author
Heinrich Schuchardt
<heinrich.schuchardt@canonical.com>
Sat, 2 Nov 2024 15:41:30 +0000
(16:41 +0100)
committer
Tom Rini
<trini@konsulko.com>
Fri, 15 Nov 2024 00:14:06 +0000
(18:14 -0600)
We want to completely initialize the mbr and embr buffers. This requires
passing the buffer size and not the size of a pointer to the buffer.
Addresses-Coverity-ID: 510454 Wrong sizeof argument
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
test/cmd/mbr.c
patch
|
blob
|
history
diff --git
a/test/cmd/mbr.c
b/test/cmd/mbr.c
index
b14137e
..
16a8bc3
100644
(file)
--- a/
test/cmd/mbr.c
+++ b/
test/cmd/mbr.c
@@
-277,7
+277,7
@@
static int mbr_test_run(struct unit_test_state *uts)
(ulong)0xbffe00 / BLKSZ));
/* Test one MBR partition */
- init_write_buffers(mbr_wbuf,
sizeof(mbr_wbuf), ebr_wbuf, sizeof(ebr_wbuf)
, __LINE__);
+ init_write_buffers(mbr_wbuf,
BLKSZ, ebr_wbuf, BLKSZ
, __LINE__);
ut_assertok(build_mbr_parts(mbr_parts_buf, sizeof(mbr_parts_buf), 1));
ut_assertok(run_commandf("write mmc 6:0 %lx 0 1", mbr_wa));
memset(rbuf, '\0', BLKSZ);