Browse code

rtpengine: proper check for empty string inside add_rtpengine_socks()

- reported by GH #1325

Daniel-Constantin Mierla authored on 25/11/2017 08:18:23
Showing 1 changed files
... ...
@@ -906,7 +906,7 @@ int add_rtpengine_socks(struct rtpp_set * rtpp_list, char * rtpproxy,
906 906
 			p1++;
907 907
 		}
908 908
 
909
-		if (p1 != NULL && p1 != '\0') {
909
+		if (p1 != NULL && p1[0] != '\0') {
910 910
 			s1.s = p1;
911 911
 			s1.len = strlen(p1);
912 912
 			if (str2int(&s1, &port) < 0 || port > 0xFFFF) {