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
de1b8bc4
Commit
de1b8bc4
authored
Aug 21, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caf: fix error handling / integer overflow
parent
d23a1c7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
modules/demux/caf.c
modules/demux/caf.c
+6
-2
No files found.
modules/demux/caf.c
View file @
de1b8bc4
...
@@ -277,7 +277,11 @@ static int FrameSpanAddDescription( demux_t *p_demux, uint64_t i_desc_offset, fr
...
@@ -277,7 +277,11 @@ static int FrameSpanAddDescription( demux_t *p_demux, uint64_t i_desc_offset, fr
}
}
const
uint8_t
*
p_peek
;
const
uint8_t
*
p_peek
;
uint32_t
i_peek_len
=
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
2
*
10
);
/* Peeking the maximum number of bytes that two 64 bit numbers could use (( 64 + 6 ) / 7 = 10 ). */
int
i_peek_len
=
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
2
*
10
);
/* Peeking the maximum number of bytes that two 64 bit numbers could use
* (( 64 + 6 ) / 7 = 10). */
if
(
i_peek_len
<
0
)
i_peek_len
=
0
;
if
(
p_sys
->
fmt
.
audio
.
i_bytes_per_frame
)
if
(
p_sys
->
fmt
.
audio
.
i_bytes_per_frame
)
{
{
...
@@ -302,7 +306,7 @@ static int FrameSpanAddDescription( demux_t *p_demux, uint64_t i_desc_offset, fr
...
@@ -302,7 +306,7 @@ static int FrameSpanAddDescription( demux_t *p_demux, uint64_t i_desc_offset, fr
}
}
else
else
{
{
if
(
i_desc_size
>=
i_peek_len
)
if
(
i_desc_size
>=
(
unsigned
)
i_peek_len
)
{
{
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
...
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