diff options
author | William Wilgus <wilgus.william@gmail.com> | 2024-06-04 15:56:56 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2024-06-04 15:56:56 -0400 |
commit | dad01f29ff04772151d614781f1bb93b55ca1af2 (patch) | |
tree | 63184366ccfe47c0d0eaacde39dc2e2c38311207 | |
parent | afba86f0f79d314f0414975fa71db6a6a41118cb (diff) | |
download | rockbox-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.c | 4 |
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; |