If we received an event without a content-type header we were
dereferencing a null pointer leading to a seg fault.
Reported-by: Ico <ico@voip-io.org>
ESL-90 --resolve
if (handle->last_sr_event) {
char *ct = esl_event_get_header(handle->last_sr_event,"content-type");
- if (strcasecmp(ct, "api/response") && strcasecmp(ct, "command/reply")) {
+ if (ct && strcasecmp(ct, "api/response") && strcasecmp(ct, "command/reply")) {
esl_event_t *ep;
for(ep = handle->race_event; ep && ep->next; ep = ep->next);