why does this return a bus error
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

int count_words(char *sentence) {
    int count = 0;
    char *token = strtok(sentence, " ");
    while (token) {
        count++;
        printf("token: %s\n", token);
        token = strtok(NULL, " ");
    }

    return count;
}

int main() {
    char *sentence = "main.o : main.c linked_list.h ";

    int n = count_words(sentence);

    printf("%d\n", n);

    return 0;
}