Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
c5b02d01
Commit
c5b02d01
authored
Sep 15, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed potential stack overflow in mp4 demuxer.
Reported by Sebastian Apelt, Siberas.
parent
861e374d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+11
-5
No files found.
modules/demux/mp4/libmp4.c
View file @
c5b02d01
...
...
@@ -2876,18 +2876,24 @@ static void __MP4_BoxDumpStructure( stream_t *s,
}
else
{
char
str
[
512
];
unsigned
int
i
;
memset
(
str
,
(
uint8_t
)
' '
,
512
);
char
str
[
512
];
if
(
i_level
*
5
+
1
>=
sizeof
(
str
)
)
return
;
memset
(
str
,
' '
,
sizeof
(
str
)
);
for
(
i
=
0
;
i
<
i_level
;
i
++
)
{
str
[
i
*
5
]
=
'|'
;
}
if
MP4_BOX_TYPE_ASCII
()
sprintf
(
str
+
i_level
*
5
,
"+ %4.4s size %d"
,
if
(
MP4_BOX_TYPE_ASCII
()
)
snprintf
(
&
str
[
i_level
*
5
],
sizeof
(
str
)
-
5
*
i_level
,
"+ %4.4s size %d"
,
(
char
*
)
&
p_box
->
i_type
,
(
uint32_t
)
p_box
->
i_size
);
else
sprintf
(
str
+
i_level
*
5
,
"+ c%3.3s size %d"
,
snprintf
(
&
str
[
i_level
*
5
],
sizeof
(
str
)
-
5
*
i_level
,
"+ c%3.3s size %d"
,
(
char
*
)
&
p_box
->
i_type
+
1
,
(
uint32_t
)
p_box
->
i_size
);
msg_Dbg
(
s
,
"%s"
,
str
);
}
...
...
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