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
089782f7
Commit
089782f7
authored
Apr 27, 2003
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/control/http.c: fixed buffer allocation problem.
parent
79a114c6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
modules/control/http.c
modules/control/http.c
+18
-3
No files found.
modules/control/http.c
View file @
089782f7
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* http.c : http remote control plugin for vlc
* http.c : http remote control plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: http.c,v 1.
1 2003/04/26 21:36:23
gbazin Exp $
* $Id: http.c,v 1.
2 2003/04/27 00:02:27
gbazin Exp $
*
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
*
...
@@ -368,10 +368,23 @@ static int httpd_page_interface_update( intf_thread_t *p_intf,
...
@@ -368,10 +368,23 @@ static int httpd_page_interface_update( intf_thread_t *p_intf,
playlist_t
*
p_playlist
,
playlist_t
*
p_playlist
,
uint8_t
**
pp_data
,
int
*
pi_data
)
uint8_t
**
pp_data
,
int
*
pi_data
)
{
{
int
i
;
int
i
,
i_size
=
0
;
char
*
p
;
char
*
p
;
p
=
*
pp_data
=
malloc
(
10240
);
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
/*
* Count playlist items for memory allocation
*/
for
(
i
=
0
;
i
<
p_playlist
->
i_size
;
i
++
)
{
i_size
+=
sizeof
(
"<a href=?action=play&item=?>? - </a><br />
\n
"
);
i_size
+=
strlen
(
p_playlist
->
pp_items
[
i
]
->
psz_name
);
}
/* add something for all the static strings below */
i_size
+=
8192
;
p
=
*
pp_data
=
malloc
(
i_size
);
p
+=
sprintf
(
p
,
"<html>
\n
"
);
p
+=
sprintf
(
p
,
"<html>
\n
"
);
p
+=
sprintf
(
p
,
"<head>
\n
"
);
p
+=
sprintf
(
p
,
"<head>
\n
"
);
...
@@ -427,5 +440,7 @@ static int httpd_page_interface_update( intf_thread_t *p_intf,
...
@@ -427,5 +440,7 @@ static int httpd_page_interface_update( intf_thread_t *p_intf,
*
pi_data
=
strlen
(
*
pp_data
)
+
1
;
*
pi_data
=
strlen
(
*
pp_data
)
+
1
;
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
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