Browse Source

rtpengine: proper check for empty string inside add_rtpengine_socks()

- reported by GH #1325
Daniel-Constantin Mierla 7 năm trước cách đây
mục cha
commit
991fe9b28e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/modules/rtpengine/rtpengine.c

+ 1 - 1
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) {