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
9f0a91cb
Commit
9f0a91cb
authored
Jan 06, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: wav: stay within riff chunk boundaries (fix #10323)
parent
fba05eaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
modules/demux/wav.c
modules/demux/wav.c
+10
-5
No files found.
modules/demux/wav.c
View file @
9f0a91cb
...
...
@@ -420,15 +420,20 @@ static int Demux( demux_t *p_demux )
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
block_t
*
p_block
;
const
int64_t
i_pos
=
stream_Tell
(
p_demux
->
s
);
unsigned
int
i_read_size
=
p_sys
->
i_frame_size
;
if
(
p_sys
->
i_data_size
>
0
&&
i_pos
>=
p_sys
->
i_data_pos
+
p_sys
->
i_data_size
)
if
(
p_sys
->
i_data_size
>
0
)
{
/* EOF */
return
0
;
int64_t
i_end
=
p_sys
->
i_data_pos
+
p_sys
->
i_data_size
;
if
(
i_pos
>=
i_end
)
return
0
;
/* EOF */
/* Don't read past data chunk boundary */
if
(
i_end
<
i_pos
+
i_read_size
)
i_read_size
=
i_end
-
i_pos
;
}
if
(
(
p_block
=
stream_Block
(
p_demux
->
s
,
p_sys
->
i_frame
_size
)
)
==
NULL
)
if
(
(
p_block
=
stream_Block
(
p_demux
->
s
,
i_read
_size
)
)
==
NULL
)
{
msg_Warn
(
p_demux
,
"cannot read data"
);
return
0
;
...
...
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