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
3bc4a7f9
Commit
3bc4a7f9
authored
Jan 18, 2008
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix erroneous use of freed data in the cookie forwarding code.
parent
016e5cdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
modules/access/http.c
modules/access/http.c
+7
-6
No files found.
modules/access/http.c
View file @
3bc4a7f9
...
...
@@ -145,12 +145,12 @@ struct access_sys_t
vlc_bool_t
b_reconnect
;
vlc_bool_t
b_continuous
;
vlc_bool_t
b_pace_control
;
vlc_array_t
*
cookies
;
};
/* */
static
int
OpenWith
RedirectionStatus
(
vlc_object_t
*
p_this
,
vlc_bool_t
b_is_from_redirection
);
static
int
OpenWith
Cookies
(
vlc_object_t
*
p_this
,
vlc_array_t
*
cookies
);
/* */
static
ssize_t
Read
(
access_t
*
,
uint8_t
*
,
size_t
);
...
...
@@ -173,17 +173,17 @@ static void cookie_append( vlc_array_t * cookies, char * cookie );
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
)
{
return
OpenWith
RedirectionStatus
(
p_this
,
VLC_FALSE
);
return
OpenWith
Cookies
(
p_this
,
NULL
);
}
static
int
OpenWith
RedirectionStatus
(
vlc_object_t
*
p_this
,
vlc_bool_t
b_is_from_redirection
)
static
int
OpenWith
Cookies
(
vlc_object_t
*
p_this
,
vlc_array_t
*
cookies
)
{
access_t
*
p_access
=
(
access_t
*
)
p_this
;
access_sys_t
*
p_sys
;
char
*
psz
,
*
p
;
/* Only forward an store cookies if the corresponding option is activated */
vlc_bool_t
b_forward_cookies
=
var_CreateGetBool
(
p_access
,
"http-forward-cookies"
);
vlc_array_t
*
saved_cookies
=
b_forward_cookies
?
(
b_is_from_redirection
?
p_access
->
p_sys
->
cookies
:
vlc_array_new
())
:
NULL
;
vlc_array_t
*
saved_cookies
=
b_forward_cookies
?
(
cookies
?
:
vlc_array_new
())
:
NULL
;
/* Set up p_access */
STANDARD_READ_ACCESS_INIT
;
...
...
@@ -365,10 +365,11 @@ connect:
free
(
p_sys
->
psz_user_agent
);
Disconnect
(
p_access
);
cookies
=
p_sys
->
cookies
;
free
(
p_sys
);
/* Do new Open() run with new data */
return
OpenWith
RedirectionStatus
(
p_this
,
VLC_TRUE
);
return
OpenWith
Cookies
(
p_this
,
cookies
);
}
if
(
p_sys
->
b_mms
)
...
...
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