Merge pull request #360 from dragos-oancea/switch_event-nullptr-passed

[core] scan-build: Null pointer passed as an argument to a 'nonnull' parameter - switch_event_base_add_header()
This commit is contained in:
Andrey Volk 2020-02-14 20:43:45 +04:00 committed by GitHub
commit 463e1c180e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1139,6 +1139,9 @@ static switch_status_t switch_event_base_add_header(switch_event_t *event, switc
memcpy(hv, "|:", 2);
hv += 2;
}
if (!header->array[j]) {
continue;
}
memcpy(hv, header->array[j], strlen(header->array[j]));
hv += strlen(header->array[j]);
}