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
fe82dccc
Commit
fe82dccc
authored
Feb 27, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed segfault with corrupted zip file.
parent
08813ee6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
modules/access/zip/zipstream.c
modules/access/zip/zipstream.c
+8
-6
No files found.
modules/access/zip/zipstream.c
View file @
fe82dccc
...
...
@@ -353,24 +353,22 @@ static int CreatePlaylist( stream_t *s, char **pp_buffer )
{
stream_sys_t
*
p_sys
=
s
->
p_sys
;
unzFile
file
=
p_sys
->
zipFile
;
if
(
!
file
)
return
-
1
;
/* Get some infos about zip archive */
int
i_ret
=
0
;
unzFile
file
=
p_sys
->
zipFile
;
vlc_array_t
*
p_filenames
=
vlc_array_new
();
/* Will contain char* */
/* List all file names in Zip archive */
i_ret
=
GetFilesInZip
(
s
,
file
,
p_filenames
,
NULL
);
if
(
i_ret
<
0
)
{
unzClose
(
file
);
i_ret
=
-
1
;
goto
exit
;
}
/* Close archive */
unzClose
(
file
);
p_sys
->
zipFile
=
NULL
;
/* Construct the xspf playlist */
i_ret
=
WriteXSPF
(
pp_buffer
,
p_filenames
,
p_sys
->
psz_path
);
if
(
i_ret
>
0
)
...
...
@@ -379,6 +377,10 @@ static int CreatePlaylist( stream_t *s, char **pp_buffer )
i_ret
=
-
1
;
exit:
/* Close archive */
unzClose
(
file
);
p_sys
->
zipFile
=
NULL
;
for
(
int
i
=
0
;
i
<
vlc_array_count
(
p_filenames
);
i
++
)
{
free
(
vlc_array_item_at_index
(
p_filenames
,
i
)
);
...
...
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