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
ad03b4e1
Commit
ad03b4e1
authored
Aug 24, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: avi: handle zero sized lists (fix #9056, fix #8413)
parent
e0e03582
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
modules/demux/avi/libavi.c
modules/demux/avi/libavi.c
+5
-3
modules/demux/avi/libavi.h
modules/demux/avi/libavi.h
+1
-0
No files found.
modules/demux/avi/libavi.c
View file @
ad03b4e1
...
...
@@ -112,6 +112,7 @@ static int AVI_ChunkRead_list( stream_t *s, avi_chunk_t *p_container )
avi_chunk_t
*
p_chk
;
const
uint8_t
*
p_peek
;
bool
b_seekable
;
int
i_ret
=
VLC_SUCCESS
;
if
(
p_container
->
common
.
i_chunk_size
>
0
&&
p_container
->
common
.
i_chunk_size
<
4
)
{
...
...
@@ -173,7 +174,7 @@ static int AVI_ChunkRead_list( stream_t *s, avi_chunk_t *p_container )
}
p_container
->
common
.
p_last
=
p_chk
;
if
(
AVI_ChunkRead
(
s
,
p_chk
,
p_container
)
)
if
(
i_ret
=
AVI_ChunkRead
(
s
,
p_chk
,
p_container
)
)
{
break
;
}
...
...
@@ -196,6 +197,7 @@ static int AVI_ChunkRead_list( stream_t *s, avi_chunk_t *p_container )
}
msg_Dbg
(
(
vlc_object_t
*
)
s
,
"</list
\'
%4.4s
\'
>"
,
(
char
*
)
&
p_container
->
list
.
i_type
);
if
(
i_ret
==
AVI_ZERO_FOURCC
)
return
i_ret
;
return
VLC_SUCCESS
;
}
...
...
@@ -831,7 +833,7 @@ int AVI_ChunkRead( stream_t *s, avi_chunk_t *p_chk, avi_chunk_t *p_father )
if
(
p_chk
->
common
.
i_chunk_fourcc
==
VLC_FOURCC
(
0
,
0
,
0
,
0
)
)
{
msg_Warn
(
(
vlc_object_t
*
)
s
,
"found null fourcc chunk (corrupted file?)"
);
return
VLC_EGENERI
C
;
return
AVI_ZERO_FOURC
C
;
}
p_chk
->
common
.
p_father
=
p_father
;
...
...
@@ -839,7 +841,7 @@ int AVI_ChunkRead( stream_t *s, avi_chunk_t *p_chk, avi_chunk_t *p_father )
if
(
AVI_Chunk_Function
[
i_index
].
AVI_ChunkRead_function
)
{
int
i_return
=
AVI_Chunk_Function
[
i_index
].
AVI_ChunkRead_function
(
s
,
p_chk
);
if
(
i_return
==
AVI_STRD_ZERO_CHUNK
)
if
(
i_return
==
AVI_STRD_ZERO_CHUNK
||
i_return
==
AVI_ZERO_FOURCC
)
{
if
(
!
p_father
)
return
VLC_EGENERIC
;
return
AVI_NextChunk
(
s
,
p_father
);
...
...
modules/demux/avi/libavi.h
View file @
ad03b4e1
...
...
@@ -179,6 +179,7 @@ typedef struct avi_chunk_dmlh_s
}
avi_chunk_dmlh_t
;
#define AVI_STRD_ZERO_CHUNK 0xFF
#define AVI_ZERO_FOURCC 0xFE
#define AVI_INDEX_OF_INDEXES 0x00
#define AVI_INDEX_OF_CHUNKS 0x01
...
...
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