strchr not stopping at null terminator

I haven't done c++ in years, so I'm probably just doing something stupid. I'm using strchr to search a char array, and I'm expecting it to stop at the null terminator if the character isn't found. See the code below:

void setup() {
  Serial.begin(9600);
  char str[] = "12345678";
  char * end = strchr(str, ' ');
  unsigned int len = end-str;
  Serial.println(len);
}

void loop() {
}

Since I don't have a space in the string, I would expect it to stop at the null terminator and print a length of 8. Instead it's 63245. What am I doing wrong?

Never mind. I just read that it returns a null pointer if it doesn't find the character. Makes sense now.