why is there segfault in lines 32-33?
typedef struct user {
    char name[MAX_NAME];
    char profile_pic[MAX_NAME];  // This is a *filename*, not the file contents.
    struct post *first_post;
    struct user *friends[MAX_FRIENDS];
    struct user *next;
} User;

typedef struct post {
    char author[MAX_NAME];
    char *contents;
    time_t *date;
    struct post *next;
} Post;

int make_post(const User *author, User *target, char *contents) {
    if (author == NULL || target == NULL) return 2;
    int j = 0;
    for (int i = 0; i < MAX_FRIENDS; i++) {
        if (author->friends[i] == NULL) break;
        else if (strcmp(author->friends[i]->name, target->name) == 0) {
            j++;
            break;
        }
    }
    //printf("**********\n");
    if (j == 0) return 1;
    Post *new_post = (Post *)malloc(sizeof(Post));
    printf("**********\n");
    strcpy(new_post->author, author->name);
    printf("**********\n");
    new_post->contents[MAX_NAME - 1] = '\0';
    strcpy(new_post->contents, contents);
    //new_post->contents[MAX_NAME - 1] = '\0';
    printf("***@@@@@@@@*\n");
    new_post->date = (time_t *)malloc(sizeof(time_t));
    *(new_post->date) = time(NULL);
    new_post->next = target->first_post;
    printf("***##########*\n");
    target->first_post = new_post;
    return 0;
}