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
af3bbd8f
Commit
af3bbd8f
authored
Dec 15, 2013
by
Denis Charmet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid infinite recursion loop when parsing tags
Fix #10028
parent
17214ee7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
modules/demux/mkv/matroska_segment.cpp
modules/demux/mkv/matroska_segment.cpp
+4
-2
No files found.
modules/demux/mkv/matroska_segment.cpp
View file @
af3bbd8f
...
@@ -268,6 +268,8 @@ SimpleTag * matroska_segment_c::ParseSimpleTags( KaxTagSimple *tag, int target_t
...
@@ -268,6 +268,8 @@ SimpleTag * matroska_segment_c::ParseSimpleTags( KaxTagSimple *tag, int target_t
EbmlElement
*
el
;
EbmlElement
*
el
;
EbmlParser
*
ep
=
new
EbmlParser
(
&
es
,
tag
,
&
sys
.
demuxer
);
EbmlParser
*
ep
=
new
EbmlParser
(
&
es
,
tag
,
&
sys
.
demuxer
);
SimpleTag
*
p_simple
=
new
SimpleTag
;
SimpleTag
*
p_simple
=
new
SimpleTag
;
size_t
max_size
=
tag
->
GetSize
();
size_t
size
=
0
;
if
(
!
p_simple
)
if
(
!
p_simple
)
{
{
...
@@ -281,7 +283,7 @@ SimpleTag * matroska_segment_c::ParseSimpleTags( KaxTagSimple *tag, int target_t
...
@@ -281,7 +283,7 @@ SimpleTag * matroska_segment_c::ParseSimpleTags( KaxTagSimple *tag, int target_t
msg_Dbg
(
&
sys
.
demuxer
,
"| + Simple Tag "
);
msg_Dbg
(
&
sys
.
demuxer
,
"| + Simple Tag "
);
try
try
{
{
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
)
while
(
(
el
=
ep
->
Get
()
)
!=
NULL
&&
size
<
max_size
)
{
{
if
(
unlikely
(
el
->
GetSize
()
>=
SIZE_MAX
)
)
if
(
unlikely
(
el
->
GetSize
()
>=
SIZE_MAX
)
)
{
{
...
@@ -322,6 +324,7 @@ SimpleTag * matroska_segment_c::ParseSimpleTags( KaxTagSimple *tag, int target_t
...
@@ -322,6 +324,7 @@ SimpleTag * matroska_segment_c::ParseSimpleTags( KaxTagSimple *tag, int target_t
p_simple
->
sub_tags
.
push_back
(
p_st
);
p_simple
->
sub_tags
.
push_back
(
p_st
);
}
}
/*TODO Handle binary tags*/
/*TODO Handle binary tags*/
size
+=
el
->
HeadSize
()
+
el
->
GetSize
();
}
}
}
}
catch
(...)
catch
(...)
...
@@ -339,7 +342,6 @@ SimpleTag * matroska_segment_c::ParseSimpleTags( KaxTagSimple *tag, int target_t
...
@@ -339,7 +342,6 @@ SimpleTag * matroska_segment_c::ParseSimpleTags( KaxTagSimple *tag, int target_t
delete
p_simple
;
delete
p_simple
;
return
NULL
;
return
NULL
;
}
}
for
(
int
i
=
0
;
metadata_map
[
i
].
key
;
i
++
)
for
(
int
i
=
0
;
metadata_map
[
i
].
key
;
i
++
)
{
{
if
(
!
strcmp
(
p_simple
->
psz_tag_name
,
metadata_map
[
i
].
key
)
&&
if
(
!
strcmp
(
p_simple
->
psz_tag_name
,
metadata_map
[
i
].
key
)
&&
...
...
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