Skip to content
Permalink
Browse files
more mutators
  • Loading branch information
agroce committed Feb 21, 2020
1 parent 0e189e9 commit 98393a86eaef32fc0b5e14b9ce9daebb4d885f76
Showing 1 changed file with 25 additions and 1 deletion.
@@ -5069,7 +5069,7 @@ static int use_mutation_tool(u8 **out_buf, s32* temp_len) {
size_t pos;
for (size_t i = 0; i < MAX_MUTANT_TRIES; i++) {
pos = UR((*temp_len) - 1);
int choice = UR(53);
int choice = UR(61);
switch (choice) {
case 0: /* Semantic statement deletion */
strncpy(original, "\n", MAX_MUTANT_CHANGE);
@@ -5273,6 +5273,30 @@ static int use_mutation_tool(u8 **out_buf, s32* temp_len) {
case 52:
delim_swap(out_buf, temp_len, &original, &replacement, pos, ",", ",", ",");
break;
case 53: /* Just delete a line */
delim_replace(out_buf, temp_len, &original, &replacement, pos, "\n", "\n", "");
break;
case 54: /* Delete something like "const" case 1 */
delim_replace(out_buf, temp_len, &original, &replacement, pos, " ", " ", "");
break;
case 55: /* Delete something like "const" case 2 */
delim_replace(out_buf, temp_len, &original, &replacement, pos, "\n", " ", "");
break;
case 56: /* Delete something like "const" case 3 */
delim_replace(out_buf, temp_len, &original, &replacement, pos, "(", " ", "");
break;
case 57: /* Swap space delimited things case 1 */
delim_swap(out_buf, temp_len, &original, &replacement, pos, " ", " ", " ");
break;
case 58: /* Swap space delimited things case 1 */
delim_swap(out_buf, temp_len, &original, &replacement, pos, " ", " ", ")");
break;
case 59: /* Swap space delimited things case 1 */
delim_swap(out_buf, temp_len, &original, &replacement, pos, "(", " ", " ");
break;
case 60: /* Swap space delimited things case 1 */
delim_swap(out_buf, temp_len, &original, &replacement, pos, "(", " ", ")");
break;
}
opos = strnstr(*out_buf + pos, original, *temp_len - pos);
if (opos != NULL) {

0 comments on commit 98393a8

Please sign in to comment.