]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[core] scan-build: Null pointer passed as an argument to a 'nonnull' parameter -... 360/head
authorDragos Oancea <dragos@signalwire.com>
Fri, 14 Feb 2020 15:53:16 +0000 (15:53 +0000)
committerDragos Oancea <dragos@signalwire.com>
Fri, 14 Feb 2020 15:53:16 +0000 (15:53 +0000)
src/switch_event.c

index 519e542672f1f7fad7572be1ce4c9f0bf73a96a0..91e07c6b79923e52e0c3542b8825461517935a38 100644 (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]);
                        }