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
add8534f
Commit
add8534f
authored
Feb 28, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent a potential integer overflow (mkv).
parent
059a5785
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
modules/demux/mkv/mkv.cpp
modules/demux/mkv/mkv.cpp
+3
-1
modules/demux/mkv/mkv.hpp
modules/demux/mkv/mkv.hpp
+1
-0
No files found.
modules/demux/mkv/mkv.cpp
View file @
add8534f
...
...
@@ -458,7 +458,7 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, chapter_it
}
/* Utility function for BlockDecode */
static
block_t
*
MemToBlock
(
demux_t
*
p_demux
,
uint8_t
*
p_mem
,
in
t
i_mem
,
size_t
offset
)
static
block_t
*
MemToBlock
(
demux_t
*
p_demux
,
uint8_t
*
p_mem
,
size_
t
i_mem
,
size_t
offset
)
{
block_t
*
p_block
;
if
(
!
(
p_block
=
block_New
(
p_demux
,
i_mem
+
offset
)
)
)
return
NULL
;
...
...
@@ -536,6 +536,8 @@ static void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simp
{
data
=
&
block
->
GetBuffer
(
i
);
}
if
(
!
data
->
Buffer
()
||
data
->
Size
()
>
SIZE_MAX
)
break
;
if
(
tk
->
i_compression_type
==
MATROSKA_COMPRESSION_HEADER
&&
tk
->
p_compression_data
!=
NULL
)
p_block
=
MemToBlock
(
p_demux
,
data
->
Buffer
(),
data
->
Size
(),
tk
->
p_compression_data
->
GetSize
()
);
...
...
modules/demux/mkv/mkv.hpp
View file @
add8534f
...
...
@@ -34,6 +34,7 @@
* early enough. */
#define __STDC_FORMAT_MACROS 1
#define __STDC_CONSTANT_MACROS 1
#define __STDC_LIMIT_MACROS 1
#ifdef HAVE_CONFIG_H
# include "config.h"
...
...
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