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
bc04b0c0
Commit
bc04b0c0
authored
Feb 25, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
httpd: avoid uncontrolled format strings
parent
a0326789
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/network/httpd.c
src/network/httpd.c
+3
-3
No files found.
src/network/httpd.c
View file @
bc04b0c0
...
...
@@ -694,7 +694,7 @@ static int httpd_StreamCallBack(httpd_callback_sys_t *p_sys,
vlc_mutex_lock
(
&
stream
->
lock
);
for
(
size_t
i
=
0
;
i
<
stream
->
i_http_headers
;
i
++
)
if
(
strncasecmp
(
stream
->
p_http_headers
[
i
].
name
,
"Content-Length"
,
14
))
{
httpd_MsgAdd
(
answer
,
stream
->
p_http_headers
[
i
].
name
,
httpd_MsgAdd
(
answer
,
stream
->
p_http_headers
[
i
].
name
,
"%s"
,
stream
->
p_http_headers
[
i
].
value
);
if
(
!
strncasecmp
(
stream
->
p_http_headers
[
i
].
name
,
"Content-Type"
,
12
))
...
...
@@ -744,7 +744,7 @@ static int httpd_StreamCallBack(httpd_callback_sys_t *p_sys,
if
(
!
b_xplaystream
)
answer
->
i_body_offset
=
0
;
}
else
if
(
!
b_has_content_type
)
httpd_MsgAdd
(
answer
,
"Content-type"
,
stream
->
psz_mime
);
httpd_MsgAdd
(
answer
,
"Content-type"
,
"%s"
,
stream
->
psz_mime
);
if
(
!
b_has_cache_control
)
httpd_MsgAdd
(
answer
,
"Cache-Control"
,
"no-cache"
);
...
...
@@ -1557,7 +1557,7 @@ static void httpd_ClientRecv(httpd_client_t *cl)
*
colon
++
=
'\0'
;
while
(
*
colon
==
' '
)
colon
++
;
httpd_MsgAdd
(
&
cl
->
query
,
line
,
colon
);
httpd_MsgAdd
(
&
cl
->
query
,
line
,
"%s"
,
colon
);
if
(
!
strcasecmp
(
line
,
"Content-Length"
))
cl
->
query
.
i_body
=
atol
(
colon
);
...
...
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