mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-02 20:05:24 +08:00
Fix off-by one
cesanta/mongoose#677 PUBLISHED_FROM=4b62bdefac08fa3bedf511dc4d6f7463af3325fc
This commit is contained in:
parent
6f17f3e2c2
commit
0e0c6b8357
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user