contents is a pointer to heap-allocated memory. Why is this code causing a segmentation fault?
typedef struct post {
    char author[MAX_NAME];
    char *contents;
    time_t *date;
    struct post *next;
} Post;

Post *create_post(char **contents) {
    Post *new_post = malloc(sizeof(Post));
    if(new_post == NULL) {
            printf("Error: Memory cannot be allocated");
            exit(1);
    }
    strcpy(new_post->contents, *contents);

    return new_post;
}