summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-06-04 15:56:56 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2024-06-04 15:56:56 -0400
commitdad01f29ff04772151d614781f1bb93b55ca1af2 (patch)
tree63184366ccfe47c0d0eaacde39dc2e2c38311207
parentafba86f0f79d314f0414975fa71db6a6a41118cb (diff)
downloadrockbox-dad01f29ff.tar.gz
rockbox-dad01f29ff.zip
[coverity] multiboot.c write_bootdata_ fix memset size
the payload arg was swapped with the size arg Change-Id: I1e1ef6e842a4fd00f7d4a656438fccbe7abc429a
-rw-r--r--firmware/common/multiboot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/common/multiboot.c b/firmware/common/multiboot.c
index 8d6573d2dd..682327ef3f 100644
--- a/firmware/common/multiboot.c
+++ b/firmware/common/multiboot.c
@@ -29,7 +29,7 @@
static void write_bootdata_v0(struct boot_data_t *data, unsigned int boot_volume)
{
- memset(data->payload, data->length, 0);
+ memset(data->payload, 0, data->length);
data->_boot_volume = boot_volume;
data->version = 0;
@@ -37,7 +37,7 @@ static void write_bootdata_v0(struct boot_data_t *data, unsigned int boot_volume
static void write_bootdata_v1(struct boot_data_t *data, unsigned int boot_volume)
{
- memset(data->payload, data->length, 0);
+ memset(data->payload, 0, data->length);
data->_boot_volume = 0xff;
data->version = 1;