Module: kamailio
Branch: 5.1
Commit: b8698724134095814339701c19f0d02bb37caa89
URL: 
https://github.com/kamailio/kamailio/commit/b8698724134095814339701c19f0d02bb37caa89

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2017-12-08T16:55:31+01:00

rls: avoid walking a null string

(cherry picked from commit 5f62d05180c7148f3899732dfc0da44034a314f8)

---

Modified: src/modules/rls/notify.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/b8698724134095814339701c19f0d02bb37caa89.diff
Patch: 
https://github.com/kamailio/kamailio/commit/b8698724134095814339701c19f0d02bb37caa89.patch

---

diff --git a/src/modules/rls/notify.c b/src/modules/rls/notify.c
index 9b5c3a5806..55a7019032 100644
--- a/src/modules/rls/notify.c
+++ b/src/modules/rls/notify.c
@@ -1220,7 +1220,7 @@ int parse_xcap_uri(char *uri, str *host, unsigned short 
*port, str *path)
                }
        }
 
-       while(path->s[path->len] != '\0') path->len++;
+       while(path->s != NULL && path->s[path->len] != '\0') path->len++;
 
        return 1;
 }


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to