From: Dragos Oancea Date: Fri, 14 Feb 2020 15:53:16 +0000 (+0000) Subject: [core] scan-build: Null pointer passed as an argument to a 'nonnull' parameter -... X-Git-Tag: v1.10.3^2~172^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F360%2Fhead;p=thirdparty%2Ffreeswitch.git [core] scan-build: Null pointer passed as an argument to a 'nonnull' parameter - switch_event_base_add_header() --- diff --git a/src/switch_event.c b/src/switch_event.c index 519e542672..91e07c6b79 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -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]); }