mangle: bring back mangle_Resize
@@ -432,15 +432,16 @@ void mangle_mangleContent(honggfuzz_t * hfuzz, fuzzer_t * fuzzer)
mangle_Expand,
mangle_Shrink,
mangle_InsertRnd,
+ mangle_Resize,
/* *INDENT-ON* */
};
- uint64_t changesCnt = (double)fuzzer->dynamicFileSz * fuzzer->flipRate;
- if (changesCnt < 2) {
- changesCnt = 1;
- } else {
- changesCnt = util_rndGet(1, changesCnt);
+ uint64_t changesCnt = fuzzer->dynamicFileSz * fuzzer->flipRate;
+ if (changesCnt < 3ULL) {
+ /* Mini-max number of changes is 3 */
+ changesCnt = 3;
}
+ changesCnt = util_rndGet(1, changesCnt);
for (uint64_t x = 0; x < changesCnt; x++) {
uint64_t choice = util_rndGet(0, ARRAYSIZE(mangleFuncs) - 1);
