Module: kamailio
Branch: master
Commit: 991fe9b28e0e201309048f3b38a135037e40357a
URL:
https://github.com/kamailio/kamailio/commit/991fe9b28e0e201309048f3b38a1350…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-25T09:18:23+01:00
rtpengine: proper check for empty string inside add_rtpengine_socks()
- reported by GH #1325
---
Modified: src/modules/rtpengine/rtpengine.c
---
Diff:
https://github.com/kamailio/kamailio/commit/991fe9b28e0e201309048f3b38a1350…
Patch:
https://github.com/kamailio/kamailio/commit/991fe9b28e0e201309048f3b38a1350…
---
diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index 9704693eee..c3bc770da9 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -906,7 +906,7 @@ int add_rtpengine_socks(struct rtpp_set * rtpp_list, char * rtpproxy,
p1++;
}
- if (p1 != NULL && p1 != '\0') {
+ if (p1 != NULL && p1[0] != '\0') {
s1.s = p1;
s1.len = strlen(p1);
if (str2int(&s1, &port) < 0 || port > 0xFFFF) {