From 167f114e8915e6acbd43023bfbe7d46e82c19e43 Mon Sep 17 00:00:00 2001 From: dborth Date: Thu, 7 Oct 2010 19:55:41 +0000 Subject: [PATCH] fix off-by-one in http code --- source/utils/http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utils/http.cpp b/source/utils/http.cpp index f10df04..6d90f5c 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; }