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
6cca95fb
Commit
6cca95fb
authored
Oct 13, 2013
by
Denis Charmet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid double free in case of corrupted files
parent
b7979366
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
modules/demux/mkv/Ebml_parser.cpp
modules/demux/mkv/Ebml_parser.cpp
+5
-0
modules/demux/mkv/Ebml_parser.hpp
modules/demux/mkv/Ebml_parser.hpp
+1
-0
modules/demux/mkv/matroska_segment.cpp
modules/demux/mkv/matroska_segment.cpp
+7
-1
No files found.
modules/demux/mkv/Ebml_parser.cpp
View file @
6cca95fb
...
@@ -121,6 +121,11 @@ void EbmlParser::Keep( void )
...
@@ -121,6 +121,11 @@ void EbmlParser::Keep( void )
mb_keep
=
true
;
mb_keep
=
true
;
}
}
void
EbmlParser
::
Unkeep
()
{
mb_keep
=
false
;
}
int
EbmlParser
::
GetLevel
(
void
)
const
int
EbmlParser
::
GetLevel
(
void
)
const
{
{
return
mi_user_level
;
return
mi_user_level
;
...
...
modules/demux/mkv/Ebml_parser.hpp
View file @
6cca95fb
...
@@ -41,6 +41,7 @@ class EbmlParser
...
@@ -41,6 +41,7 @@ class EbmlParser
void
Reset
(
demux_t
*
p_demux
);
void
Reset
(
demux_t
*
p_demux
);
EbmlElement
*
Get
(
int
n_call
=
0
);
EbmlElement
*
Get
(
int
n_call
=
0
);
void
Keep
(
void
);
void
Keep
(
void
);
void
Unkeep
(
void
);
EbmlElement
*
UnGet
(
uint64
i_block_pos
,
uint64
i_cluster_pos
);
EbmlElement
*
UnGet
(
uint64
i_block_pos
,
uint64
i_cluster_pos
);
int
GetLevel
(
void
)
const
;
int
GetLevel
(
void
)
const
;
...
...
modules/demux/mkv/matroska_segment.cpp
View file @
6cca95fb
...
@@ -1215,7 +1215,7 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_s
...
@@ -1215,7 +1215,7 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_s
/* Check blocks validity to protect againts broken files */
/* Check blocks validity to protect againts broken files */
if
(
BlockFindTrackIndex
(
&
i_tk
,
pp_block
,
pp_simpleblock
)
)
if
(
BlockFindTrackIndex
(
&
i_tk
,
pp_block
,
pp_simpleblock
)
)
{
{
delete
pp_block
;
ep
->
Unkeep
()
;
pp_simpleblock
=
NULL
;
pp_simpleblock
=
NULL
;
pp_block
=
NULL
;
pp_block
=
NULL
;
continue
;
continue
;
...
@@ -1361,6 +1361,9 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_s
...
@@ -1361,6 +1361,9 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_s
{
{
msg_Err
(
&
sys
.
demuxer
,
"Error while reading %s... upping level"
,
typeid
(
*
el
).
name
());
msg_Err
(
&
sys
.
demuxer
,
"Error while reading %s... upping level"
,
typeid
(
*
el
).
name
());
ep
->
Up
();
ep
->
Up
();
ep
->
Unkeep
();
pp_simpleblock
=
NULL
;
pp_block
=
NULL
;
break
;
break
;
}
}
if
(
MKV_IS_ID
(
el
,
KaxBlock
)
)
if
(
MKV_IS_ID
(
el
,
KaxBlock
)
)
...
@@ -1414,6 +1417,9 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_s
...
@@ -1414,6 +1417,9 @@ int matroska_segment_c::BlockGet( KaxBlock * & pp_block, KaxSimpleBlock * & pp_s
{
{
msg_Err
(
&
sys
.
demuxer
,
"Error while reading %s... upping level"
,
typeid
(
*
el
).
name
());
msg_Err
(
&
sys
.
demuxer
,
"Error while reading %s... upping level"
,
typeid
(
*
el
).
name
());
ep
->
Up
();
ep
->
Up
();
ep
->
Unkeep
();
pp_simpleblock
=
NULL
;
pp_block
=
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