Explorar o código

rls: avoid walking a null string

(cherry picked from commit 5f62d05180c7148f3899732dfc0da44034a314f8)
(cherry picked from commit b8698724134095814339701c19f0d02bb37caa89)
Daniel-Constantin Mierla %!s(int64=7) %!d(string=hai) anos
pai
achega
4f653e95fc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
 	return 1;
 }
 }