where is the segmentation fault?
int print_user(const User *user){
    if (user == NULL){
        return 1;
    }
    if (strcmp(user->profile_pic, "") == 0){
        return -1;
    }

    FILE *profile = fopen(user->profile_pic, "rb");

    char string[1000] = "";
    while(fgets(string, sizeof(string), profile)){
        printf("%s", string);
    }
    fclose(profile);
    fprintf(stdout, "\nName: %s\n------------------------------------------\nFriends:\n", user->name);
    for (int i = 0; i < 10; i++){
        if (user->friends[i] != NULL){
            fprintf(stdout,"%s\n", user->friends[i]->name);
        }
    }
    
    if (user->first_post != NULL){ 
        Post *curr = user->first_post;
        while(curr != NULL){
            char *date_char = ctime(curr->date);
            fprintf(stdout,"------------------------------------------\nPosts:\nFrom: %s\nDate: %s\n\n%s\n\n==\n", curr->author, date_char, curr->contents);
            curr = curr->next;

        }
   
    }

    return 0;


}