From: Julien Desfossez Date: Tue, 7 Jan 2014 19:16:03 +0000 (-0500) Subject: Fix: lttng-live should accept 0 in addresses X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=cf5d433239d042b4009ff8d9a5aa6ed42724c53a;p=deliverable%2Fbabeltrace.git Fix: lttng-live should accept 0 in addresses Fixes #708 Signed-off-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- diff --git a/formats/lttng-live/lttng-live.c b/formats/lttng-live/lttng-live.c index 44f7d596f..8f734f7bd 100644 --- a/formats/lttng-live/lttng-live.c +++ b/formats/lttng-live/lttng-live.c @@ -55,7 +55,7 @@ static int parse_url(const char *path, char *hostname, int *port, } /* TODO : parse for IPv6 as well */ /* Parse the hostname or IP */ - ret = sscanf(path + proto_offset, "%[a-zA-Z.1-9%-]%s", + ret = sscanf(path + proto_offset, "%[a-zA-Z.0-9%-]%s", hostname, remain); if (ret == 2) { /* Optional port number */