int create_user(const char *name, User **user_ptr_add) {
    User *prev;
    User *curr = *user_ptr_add;
    if (strlen(name) > 31) {
        return 2;
    } else {

        while (curr != NULL) {
            if (strcmp(curr->name, name) == 0) {
                return 1;
            }
            prev = curr;
            curr = curr->next;
        }

        User *new_user = malloc(sizeof(User));

        strcpy(new_user->name, name);

        new_user->name[strlen(name)] = '\0';

        new_user->profile_pic[0] = '\0';

        new_user->first_post = NULL;

        for (int i = 0; i < MAX_FRIENDS; i++) {
            (new_user->friends)[i] = NULL;
        }

        new_user->next = NULL;
        if (prev != NULL) {
            prev->next = new_user;
        } else {
            user_ptr_add[0] = curr;
        }

        return 0;
    }
}
fix segmentation fault
