Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
1b2d090e
Commit
1b2d090e
authored
Sep 26, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix HTTP/RTSP crash on invalid request URI
(cherry picked from commit a03617089bc045e343f94921f257cf71436f4812)
parent
2e33823b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
src/network/httpd.c
src/network/httpd.c
+15
-4
No files found.
src/network/httpd.c
View file @
1b2d090e
...
...
@@ -1755,16 +1755,27 @@ static void httpd_ClientRecv( httpd_client_t *cl )
*
p2
++
=
'\0'
;
}
if
(
!
strncasecmp
(
p
,
(
cl
->
query
.
i_proto
==
HTTPD_PROTO_HTTP
)
?
"http"
:
"rtsp"
,
4
)
&&
p
[
4
+
!!
strchr
(
"sS"
,
p
[
4
]
)]
==
':'
)
==
HTTPD_PROTO_HTTP
)
?
"http:"
:
"rtsp:"
,
5
)
)
{
/* Skip hier-part of URL (if present) */
p
=
strchr
(
p
,
':'
)
+
1
;
/* skip URI scheme */
p
+=
5
;
if
(
!
strncmp
(
p
,
"//"
,
2
)
)
/* skip authority */
{
/* see RFC3986 §3.2 */
p
+=
2
;
while
(
*
p
&&
!
strchr
(
"/?#"
,
*
p
)
)
p
++
;
p
+=
strcspn
(
p
,
"/?#"
)
;
}
}
else
if
(
!
strncasecmp
(
p
,
(
cl
->
query
.
i_proto
==
HTTPD_PROTO_HTTP
)
?
"https:"
:
"rtsps:"
,
6
)
)
{
/* Skip hier-part of URL (if present) */
p
+=
6
;
if
(
!
strncmp
(
p
,
"//"
,
2
)
)
/* skip authority */
{
/* see RFC3986 §3.2 */
p
+=
2
;
p
+=
strcspn
(
p
,
"/?#"
);
}
}
cl
->
query
.
psz_url
=
strdup
(
p
);
if
(
(
p3
=
strchr
(
cl
->
query
.
psz_url
,
'?'
)
)
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment