strstr () can potentially return NULL which should be checked before accessing the return to avoid any unexpected segmentation faults to due a null pointer dereference. There are a few calls to strstr ...