Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
81ac6629
Commit
81ac6629
authored
Oct 05, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix off-by-one buffer overflow
parent
7f052bbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
modules/control/http/http.c
modules/control/http/http.c
+8
-9
No files found.
modules/control/http/http.c
View file @
81ac6629
...
@@ -124,7 +124,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -124,7 +124,6 @@ static int Open( vlc_object_t *p_this )
*
psz_crl
=
NULL
;
*
psz_crl
=
NULL
;
int
i_port
=
0
;
int
i_port
=
0
;
char
*
psz_src
;
char
*
psz_src
;
char
*
psz_tmp
;
var_Create
(
p_intf
->
p_libvlc_global
,
"http-host"
,
VLC_VAR_STRING
);
var_Create
(
p_intf
->
p_libvlc_global
,
"http-host"
,
VLC_VAR_STRING
);
psz_address
=
var_GetString
(
p_intf
->
p_libvlc_global
,
"http-host"
);
psz_address
=
var_GetString
(
p_intf
->
p_libvlc_global
,
"http-host"
);
...
@@ -263,14 +262,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -263,14 +262,6 @@ static int Open( vlc_object_t *p_this )
i_port
=
8080
;
i_port
=
8080
;
}
}
/* maximum port is 65535 , strlen("65535") = 5 , + ':' = 6 */
psz_tmp
=
malloc
(
(
strlen
(
psz_address
)
+
6
)
*
sizeof
(
char
)
);
/* Ugly hack to allow to run several HTTP servers on different ports. */
sprintf
(
psz_tmp
,
"%s:%d"
,
psz_address
,
i_port
+
1
);
var_SetString
(
p_intf
->
p_libvlc_global
,
"http-host"
,
psz_tmp
);
free
(
psz_tmp
);
msg_Dbg
(
p_intf
,
"base %s:%d"
,
psz_address
,
i_port
);
msg_Dbg
(
p_intf
,
"base %s:%d"
,
psz_address
,
i_port
);
p_sys
->
p_httpd_host
=
httpd_TLSHostNew
(
VLC_OBJECT
(
p_intf
),
psz_address
,
p_sys
->
p_httpd_host
=
httpd_TLSHostNew
(
VLC_OBJECT
(
p_intf
),
psz_address
,
...
@@ -284,6 +275,14 @@ static int Open( vlc_object_t *p_this )
...
@@ -284,6 +275,14 @@ static int Open( vlc_object_t *p_this )
free
(
p_sys
);
free
(
p_sys
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
else
{
char
psz_tmp
[
NI_MAXHOST
+
6
];
/* Ugly hack to run several HTTP servers on different ports */
snprintf
(
psz_tmp
,
sizeof
(
psz_tmp
),
"%s:%d"
,
psz_address
,
i_port
+
1
);
var_SetString
(
p_intf
->
p_libvlc_global
,
"http-host"
,
psz_tmp
);
}
p_sys
->
i_files
=
0
;
p_sys
->
i_files
=
0
;
p_sys
->
pp_files
=
NULL
;
p_sys
->
pp_files
=
NULL
;
...
...
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