getting corrupted top size error
Rule *parse_file(FILE *fp) {
    Rule *rules = NULL;
    Rule *current_rule = NULL;
    char line[MAXLINE];     
    while (fgets(line, sizeof(line), fp)) {
        if (is_comment_or_empty(line) == 1) {
            continue;
        }
        if (line[0] != '\n' && line[0] != '\r') {
            line[strlen(line)-1] = '\0';
            if (line[0] == '\t') {
                // This is an action line
                Action *action = malloc(sizeof(Action));
                char *token = strtok(line+1, " ");
                int argc = 0;
                while (token != NULL) {
                    action->args = malloc(sizeof(char *));
                    action->args[argc] = strdup(token);
                    //action->args[argc] = strdup(token);
                    argc++;
                    token = strtok(NULL, " ");
                }
                action->args[argc] = NULL;
                action->next_act = current_rule->actions;
                current_rule->actions = action;
            }
            else {
                // This is a rule line
                char *target = strtok(line, " ");
                Dependency *deps = NULL;
                strtok(NULL, " ");
                char *dep = strtok(NULL, " ");
                while (dep != NULL) {
                    Dependency *new_dep = malloc(sizeof(Dependency));
                    new_dep->rule = NULL;
                    new_dep->next_dep = deps;
                    deps = new_dep;
                    dep = strtok(NULL, " ");
                }
                Rule *rule = malloc(sizeof(Rule));
                rule->target = strdup(target);
                rule->dependencies = deps;
                rule->actions = NULL;
                rule->next_rule = rules;
                rules = rule;
                current_rule = rule;
            }
        }
    }
    return rules;
}