Check 8-byte-chunk copy distance precondition

This commit is contained in:
Nigel Tao committed 2021-03-11 22:54:06 +11:00
1 parent 5767f030a3
commit 385c34930a
7 files changed
+22 -22

No files matched your search

+4 -4
View File
@@ -10191,9 +10191,9 @@ wuffs_base__io_writer__limited_copy_u32_from_history(uint8_t** ptr_iop_w,
// stronger pre-conditions.
//
// The caller needs to prove that:
// - distance > 0
// - distance <= (*ptr_iop_w - io1_w)
// - length <= (io2_w - *ptr_iop_w)
// - distance >= 1
// - distance <= (*ptr_iop_w - io1_w)
static inline uint32_t //
wuffs_base__io_writer__limited_copy_u32_from_history_fast(uint8_t** ptr_iop_w,
uint8_t* io1_w,
@@ -10226,9 +10226,9 @@ wuffs_base__io_writer__limited_copy_u32_from_history_fast(uint8_t** ptr_iop_w,
// In terms of advancing *ptr_iop_w, length is not rounded up.
//
// The caller needs to prove that:
// - distance > 0
// - distance <= (*ptr_iop_w - io1_w)
// - (length + 8) <= (io2_w - *ptr_iop_w)
// - distance >= 8
// - distance <= (*ptr_iop_w - io1_w)
static inline uint32_t //
wuffs_base__io_writer__limited_copy_u32_from_history_8_byte_chunks_fast(
uint8_t** ptr_iop_w,