[sr-dev] git:5.1:b8698724: rls: avoid walking a null string

Daniel-Constantin Mierla miconda at gmail.com
Fri Dec 8 16:56:21 CET 2017


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
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;
 }




More information about the sr-dev mailing list