diff --git a/source/utils/http.cpp b/source/utils/http.cpp index c593609..cecd8be 100644 --- a/source/utils/http.cpp +++ b/source/utils/http.cpp @@ -256,7 +256,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; }