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
e173fedd
Commit
e173fedd
authored
Jun 28, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ChunkFind: fix skipping very large chunks
(cherry picked from commit
c8ef7621
)
parent
877a82dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
modules/demux/wav.c
modules/demux/wav.c
+8
-7
No files found.
modules/demux/wav.c
View file @
e173fedd
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include <vlc/aout.h>
#include <vlc/aout.h>
#include <codecs.h>
#include <codecs.h>
#include <inttypes.h>
/*****************************************************************************
/*****************************************************************************
* Module descriptor
* Module descriptor
...
@@ -380,17 +381,17 @@ static int ChunkFind( demux_t *p_demux, char *fcc, unsigned int *pi_size )
...
@@ -380,17 +381,17 @@ static int ChunkFind( demux_t *p_demux, char *fcc, unsigned int *pi_size )
for
(
;;
)
for
(
;;
)
{
{
in
t
i_size
;
uint32_
t
i_size
;
if
(
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
8
)
<
8
)
if
(
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
8
)
<
8
)
{
{
msg_Err
(
p_demux
,
"cannot peek
()
"
);
msg_Err
(
p_demux
,
"cannot peek"
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
i_size
=
GetDWLE
(
p_peek
+
4
);
i_size
=
GetDWLE
(
p_peek
+
4
);
msg_Dbg
(
p_demux
,
"chunk: fcc=`%4.4s` size=%
d"
,
p_peek
,
i_size
);
msg_Dbg
(
p_demux
,
"chunk: fcc=`%4.4s` size=%
"
PRIu32
,
p_peek
,
i_size
);
if
(
!
memcmp
(
p_peek
,
fcc
,
4
)
)
if
(
!
memcmp
(
p_peek
,
fcc
,
4
)
)
{
{
...
@@ -401,11 +402,11 @@ static int ChunkFind( demux_t *p_demux, char *fcc, unsigned int *pi_size )
...
@@ -401,11 +402,11 @@ static int ChunkFind( demux_t *p_demux, char *fcc, unsigned int *pi_size )
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
i_size
=
__EVEN
(
i_size
)
+
8
;
/* Skip chunk */
if
(
stream_Read
(
p_demux
->
s
,
NULL
,
i_size
)
!=
i_size
)
if
(
stream_Read
(
p_demux
->
s
,
NULL
,
8
)
!=
8
{
||
stream_Read
(
p_demux
->
s
,
NULL
,
i_size
)
!=
i_size
||
((
i_size
&
1
)
&&
stream_Read
(
p_demux
->
s
,
NULL
,
1
)
!=
1
))
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