Commit 0319e91c authored by Stephane Le Roy's avatar Stephane Le Roy Committed by Andrzej Puzdrowski
Browse files

boot: bootutil: Fix encryption/decryption size during copy



During region copy, when chunk contains both header and TLVs,
the encryption/decryption size is too large, as it takes into account
TLVs only.
The fix modifies the encryption/decryption size to take into
account both header and TLVs.

Signed-off-by: default avatarStephane Le Roy <stephane.leroy@st.com>
parent a36f9513
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1534,7 +1534,7 @@ boot_copy_region(struct boot_loader_state *state,
                    if (abs_off >= tlv_off) {
                        blk_sz = 0;
                    } else {
                        blk_sz = tlv_off - abs_off;
                        blk_sz = tlv_off - abs_off - idx;
                    }
                }
                if (source_slot == 0) {