Commit b18b91c2 authored by Jamie McCrae's avatar Jamie McCrae Committed by Jamie
Browse files

boot: boot_serial: Fix uninitialised variables for upload



Fixes some issues whereby some variables were not initialised,
and undefined values were wrongly used instead

Signed-off-by: default avatarJamie McCrae <jamie.mccrae@nordicsemi.no>
parent 1da18e90
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -452,8 +452,8 @@ bs_set(char *buf, int len)
    uint8_t image_index = 0;
    size_t decoded = 0;
    uint8_t hash[IMAGE_HASH_SIZE];
    bool confirm;
    struct zcbor_string img_hash;
    bool confirm = false;
    struct zcbor_string img_hash = { 0 };
    bool ok;
    int rc;

@@ -798,7 +798,7 @@ bs_upload(char *buf, int len)
    size_t img_size_tmp = SIZE_MAX;     /* Temp variable for image size */
    const struct flash_area *fap = NULL;
    int rc;
    struct zcbor_string img_chunk_data;
    struct zcbor_string img_chunk_data = { 0 };
    size_t decoded = 0;
    bool ok;
#ifdef MCUBOOT_ERASE_PROGRESSIVELY