Fixed an error in the strnstr function: I wasn't checking the return value of strstr.