got a segmentation error for all c greater than 2, what is wrong
void fib(int **fib_seq, int c){
    *fib_seq = malloc(c*sizeof(int));
    fib_seq[0] = 0;
    if(c >= 2){
        *fib_seq[1] = 1;
    }
    if(c >= 3){
        for(int i = 2; i < c; i++){
            *fib_seq[i] = *fib_seq[i-1] + *fib_seq[i-2]; 
        }
    }
    
}

int main(int argc, char **argv) {
    /* do not change this main function */
    int count = strtol(argv[1], NULL, 10);
    int *fib_sequence;

    fib(&fib_sequence, count);
    for (int i = 0; i < count; i++) {
        printf("%d ", fib_sequence[i]);
    }
    free(fib_sequence);
    return 0;
}
