| 360 | } |
| 361 | |
| 362 | size_t MutationDispatcher::Mutate_CopyPart(uint8_t *Data, size_t Size, |
| 363 | size_t MaxSize) { |
| 364 | if (Size > MaxSize || Size == 0) return 0; |
| 365 | // If Size == MaxSize, `InsertPartOf(...)` will |
| 366 | // fail so there's no point using it in this case. |
| 367 | if (Size == MaxSize || Rand.RandBool()) |
| 368 | return CopyPartOf(Data, Size, Data, Size); |
| 369 | else |
| 370 | return InsertPartOf(Data, Size, Data, Size, MaxSize); |
| 371 | } |
| 372 | |
| 373 | size_t MutationDispatcher::Mutate_ChangeASCIIInteger(uint8_t *Data, size_t Size, |
| 374 | size_t MaxSize) { |