Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
a0361708
Commit
a0361708
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
parent
2b1a7345
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 @
a0361708
...
...
@@ -1728,16 +1728,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