Fix off-by one

cesanta/mongoose#677

PUBLISHED_FROM=4b62bdefac08fa3bedf511dc4d6f7463af3325fc
This commit is contained in:
Deomid Ryabkov authored and Cesanta Bot committed 2016-07-06 13:56:48 +00:00
1 parent 6f17f3e2c2
commit 0e0c6b8357
1 file changed
+1 -1
+1 -1
View File
@@ -7066,7 +7066,7 @@ static int mg_http_common_url_parse(const char *url, const char *schema,
}
while (*url != '\0') {
*addr = (char *) MG_REALLOC(*addr, addr_len + 5 /* space for port too. */);
*addr = (char *) MG_REALLOC(*addr, addr_len + 6 /* space for port too. */);
if (*addr == NULL) {
DBG(("OOM"));
return -1;