Преглед изворни кода

rls: avoid walking a null string

Daniel-Constantin Mierla пре 7 година
родитељ
комит
5f62d05180
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/modules/rls/notify.c

+ 1 - 1
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;
 }