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
c8829f3a
Commit
c8829f3a
authored
May 17, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memleaks: EnsureUTF8 return NULL if the string isn't valid,
so we must be able to free the memory in this case.
parent
a7bb5dff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
modules/access/http.c
modules/access/http.c
+12
-3
No files found.
modules/access/http.c
View file @
c8829f3a
...
@@ -850,7 +850,10 @@ static int ReadICYMeta( access_t *p_access )
...
@@ -850,7 +850,10 @@ static int ReadICYMeta( access_t *p_access )
strcmp
(
p_sys
->
psz_icy_title
,
&
p
[
1
]
)
)
strcmp
(
p_sys
->
psz_icy_title
,
&
p
[
1
]
)
)
{
{
free
(
p_sys
->
psz_icy_title
);
free
(
p_sys
->
psz_icy_title
);
p_sys
->
psz_icy_title
=
EnsureUTF8
(
strdup
(
&
p
[
1
]
));
char
*
psz_tmp
=
strdup
(
&
p
[
1
]
);
p_sys
->
psz_icy_title
=
EnsureUTF8
(
psz_tmp
);
if
(
!
p_sys
->
psz_icy_title
)
free
(
psz_tmp
);
p_access
->
info
.
i_update
|=
INPUT_UPDATE_META
;
p_access
->
info
.
i_update
|=
INPUT_UPDATE_META
;
msg_Dbg
(
p_access
,
"New Title=%s"
,
p_sys
->
psz_icy_title
);
msg_Dbg
(
p_access
,
"New Title=%s"
,
p_sys
->
psz_icy_title
);
...
@@ -1432,7 +1435,10 @@ static int Request( access_t *p_access, int64_t i_tell )
...
@@ -1432,7 +1435,10 @@ static int Request( access_t *p_access, int64_t i_tell )
else
if
(
!
strcasecmp
(
psz
,
"Icy-Name"
)
)
else
if
(
!
strcasecmp
(
psz
,
"Icy-Name"
)
)
{
{
free
(
p_sys
->
psz_icy_name
);
free
(
p_sys
->
psz_icy_name
);
p_sys
->
psz_icy_name
=
EnsureUTF8
(
strdup
(
p
));
char
*
psz_tmp
=
strdup
(
p
);
p_sys
->
psz_icy_name
=
EnsureUTF8
(
psz_tmp
);
if
(
!
p_sys
->
psz_icy_name
)
free
(
psz_tmp
);
msg_Dbg
(
p_access
,
"Icy-Name: %s"
,
p_sys
->
psz_icy_name
);
msg_Dbg
(
p_access
,
"Icy-Name: %s"
,
p_sys
->
psz_icy_name
);
p_sys
->
b_icecast
=
true
;
/* be on the safeside. set it here as well. */
p_sys
->
b_icecast
=
true
;
/* be on the safeside. set it here as well. */
...
@@ -1442,7 +1448,10 @@ static int Request( access_t *p_access, int64_t i_tell )
...
@@ -1442,7 +1448,10 @@ static int Request( access_t *p_access, int64_t i_tell )
else
if
(
!
strcasecmp
(
psz
,
"Icy-Genre"
)
)
else
if
(
!
strcasecmp
(
psz
,
"Icy-Genre"
)
)
{
{
free
(
p_sys
->
psz_icy_genre
);
free
(
p_sys
->
psz_icy_genre
);
p_sys
->
psz_icy_genre
=
EnsureUTF8
(
strdup
(
p
));
char
*
psz_tmp
=
strdup
(
p
);
p_sys
->
psz_icy_genre
=
EnsureUTF8
(
psz_tmp
);
if
(
!
p_sys
->
psz_icy_genre
)
free
(
psz_tmp
);
msg_Dbg
(
p_access
,
"Icy-Genre: %s"
,
p_sys
->
psz_icy_genre
);
msg_Dbg
(
p_access
,
"Icy-Genre: %s"
,
p_sys
->
psz_icy_genre
);
}
}
else
if
(
!
strncasecmp
(
psz
,
"Icy-Notice"
,
10
)
)
else
if
(
!
strncasecmp
(
psz
,
"Icy-Notice"
,
10
)
)
...
...
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