Commit 96b91c15 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

url: fix out-of-bound read

...if *next is '\0'.

(cherry picked from commit 48677cbcc5058b5c9c8ee533dcc78ad16c6503c9)
parent d0698491
......@@ -412,7 +412,7 @@ void vlc_UrlParse (vlc_url_t *restrict url, const char *str, unsigned char opt)
/* URL scheme */
next = buf;
while ((*next >= 'A' && *next <= 'Z') || (*next >= 'a' && *next <= 'z')
|| (*next >= '0' && *next <= '9') || (strchr ("+-.", *next) != NULL))
|| (*next >= '0' && *next <= '9') || memchr ("+-.", *next, 3) != NULL)
next++;
/* This is not strictly correct. In principles, the scheme is always
* present in an absolute URL and followed by a colon. Depending on the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment