diff --git a/source/utils/http.cpp b/source/utils/http.cpp index 141e2f1..51520c4 100644 --- a/source/utils/http.cpp +++ b/source/utils/http.cpp @@ -255,7 +255,7 @@ static bool http_split_url(char *host, char *path, const char *url) if (c == NULL || c[0] == 0) return false; - snprintf(host, c-p, "%s", p); + snprintf(host, c-p+1, "%s", p); strcpy(path, c); return true; }