Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
Steve Lhomme
VLC
Commits
6c58ce84
Commit
6c58ce84
authored
Nov 13, 2016
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: avi: fix unchecked calloc
parent
810ec7b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+8
-7
No files found.
modules/demux/avi/avi.c
View file @
6c58ce84
...
...
@@ -665,15 +665,16 @@ static int Open( vlc_object_t * p_this )
* directly after BITMAPINFORHEADER in the BITMAPINFO structure */
if
(
fmt
.
i_extra
>
0
)
{
const
uint8_t
*
p_pal
=
fmt
.
p_extra
;
fmt
.
video
.
p_palette
=
calloc
(
1
,
sizeof
(
video_palette_t
)
);
fmt
.
video
.
p_palette
->
i_entries
=
__MIN
(
fmt
.
i_extra
/
4
,
256
);
for
(
int
k
=
0
;
k
<
fmt
.
video
.
p_palette
->
i_entries
;
k
++
)
if
(
likely
(
fmt
.
video
.
p_palette
)
)
{
for
(
int
j
=
0
;
j
<
4
;
j
++
)
fmt
.
video
.
p_palette
->
palette
[
k
][
j
]
=
p_pal
[
4
*
k
+
j
];
const
uint8_t
*
p_pal
=
fmt
.
p_extra
;
fmt
.
video
.
p_palette
->
i_entries
=
__MIN
(
fmt
.
i_extra
/
4
,
256
);
for
(
int
k
=
0
;
k
<
fmt
.
video
.
p_palette
->
i_entries
;
k
++
)
{
for
(
int
j
=
0
;
j
<
4
;
j
++
)
fmt
.
video
.
p_palette
->
palette
[
k
][
j
]
=
p_pal
[
4
*
k
+
j
];
}
}
}
}
...
...
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