]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_sofia] Verify that replaces header params exist
authorlazedo <luis.azedo@factorlusitano.com>
Mon, 29 Jun 2020 18:46:18 +0000 (18:46 +0000)
committerGitHub <noreply@github.com>
Mon, 29 Jun 2020 18:46:18 +0000 (22:46 +0400)
src/mod/endpoints/mod_sofia/sofia.c

index 32f27462e54845191ad73a89af09a0e2accbb045..f3671c3521afe6db07d854be5da2eec64695c573 100644 (file)
@@ -11246,7 +11246,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
                if (rp_common->h_class->hc_params) {
                        int i, n;
                        msg_param_t const *params = * (msg_param_t const **) ((char *)rp_common + rp_common->h_class->hc_params);
-                       for (i = 0; params[i]; i++) {
+                       for (i = 0; params && params[i]; i++) {
                                msg_param_t param = params[i];
                                if (strchr(param, '=')) {
                                        n = strcspn(param, "=");