Explorar el Código

rls: avoid walking a null string

(cherry picked from commit 5f62d05180c7148f3899732dfc0da44034a314f8)
Daniel-Constantin Mierla hace 7 años
padre
commit
b869872413
Se han modificado 1 ficheros con 1 adiciones y 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;
 }