[vlc-commits] [Git][videolan/vlc][master] 2 commits: url: validate the query string
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Sat Nov 14 18:46:50 UTC 2026
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
8f190ac1 by Rémi Denis-Courmont at 2026-11-14T20:28:44+02:00
url: validate the query string
Fixes: #30366.
Reported-as: ANT-2026-XWF7EELM
- - - - -
5ff4fb85 by Rémi Denis-Courmont at 2026-11-14T20:28:44+02:00
url: add test cases
- - - - -
2 changed files:
- src/test/url.c
- src/text/url.c
Changes:
=====================================
src/test/url.c
=====================================
@@ -296,6 +296,10 @@ int main (void)
"/white%20spaced", NULL);
test_url_parse("p://h/[hello:world]", "p", NULL, NULL, "h", 0,
"/[hello:world]", NULL);
+ test_url_parse("p://h/[hello:world]?a=b&c=d", "p", NULL, NULL, "h", 0,
+ "/[hello:world]", "a=b&c=d");
+ test_url_parse("p://h/[hello:world]?a\nb", "p", NULL, NULL, NULL, 0,
+ NULL, NULL);
/* Relative URIs */
test_url_parse("//example.com", NULL, NULL, NULL, "example.com", 0,
NULL, NULL);
=====================================
src/text/url.c
=====================================
@@ -487,6 +487,11 @@ static int vlc_UrlParseInner(vlc_url_t *restrict url, const char *str)
if (next != NULL)
{
*(next++) = '\0';
+ if (!vlc_uri_component_validate(next, ":@/?"))
+ {
+ errno = EINVAL;
+ return -1;
+ }
url->psz_option = next;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/270e1d0d408ee2165645b52a69b0edb6f59bc888...5ff4fb8562e6df80bb7312b279893cbc32696957
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/270e1d0d408ee2165645b52a69b0edb6f59bc888...5ff4fb8562e6df80bb7312b279893cbc32696957
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list