return error if host does not fit in host string
This commit is contained in:
parent
cade3c7699
commit
e657ca40e9
|
@ -349,6 +349,11 @@ parse_url(const char *url, char *host, uint16_t *portptr, char *path)
|
|||
}
|
||||
}
|
||||
|
||||
/* check if host is null terminated */
|
||||
if (!memchr(host, 0, MAX_HOSTLEN)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Find the port. Default is 80. */
|
||||
port = 80;
|
||||
if(*urlptr == ':') {
|
||||
|
|
Loading…
Reference in a new issue