Assuming curr cannot be null, what might be causing a segmentation error?

void check_actions(Rule *curr, char *line, int len) {
    Action *new_action = malloc(sizeof(Action));
    new_action->next_act = NULL;
    Action *cur_action = NULL;
    if (curr->dependencies == NULL) {
        curr->actions = new_action;
        cur_action = new_action;
    } else {
        cur_action->next_act = new_action;
        cur_action = new_action;
    }
    char *copy = strdup(line);
    char *token = strtok(copy, " ");
    char **a = malloc(sizeof(char *) * len);
    int i = 0;

    while (token != NULL) {
        if (strcmp(token, "\t") != 0) {
            // AKA not a tab, update args
            a[i] = malloc(sizeof(char) * (strlen(token) + 1));
            strncpy(a[i], token, strlen(token) + 1);
        }
        i++;
        strtok(NULL, " ");
    }

    cur_action->args = a;
}