mangle: correct move sizes for expand/shrink
@@ -362,7 +362,7 @@ static void mangle_Expand(honggfuzz_t * hfuzz UNUSED, fuzzer_t * fuzzer, uint8_t
size_t off = util_rndGet(0, fuzzer->dynamicFileSz - 1);
fuzzer->dynamicFileSz += len;
- mangle_Move(fuzzer, buf, off, off + len, len);
+ mangle_Move(fuzzer, buf, off, off + len, fuzzer->dynamicFileSz);
}
static void mangle_Shrink(honggfuzz_t * hfuzz UNUSED, fuzzer_t * fuzzer, uint8_t * buf UNUSED)
@@ -374,7 +374,7 @@ static void mangle_Shrink(honggfuzz_t * hfuzz UNUSED, fuzzer_t * fuzzer, uint8_t
size_t len = util_rndGet(1, fuzzer->dynamicFileSz - 1);
size_t off = util_rndGet(0, fuzzer->dynamicFileSz - 1);
- mangle_Move(fuzzer, buf, off + len, off, len);
+ mangle_Move(fuzzer, buf, off + len, off, fuzzer->dynamicFileSz);
fuzzer->dynamicFileSz -= len;
}
