Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
237ccd8a
Commit
237ccd8a
authored
Nov 08, 2017
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/paletteuse: check get_color return value
Fixes CID #1420396
parent
8bcf5840
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
vf_paletteuse.c
libavfilter/vf_paletteuse.c
+4
-1
No files found.
libavfilter/vf_paletteuse.c
View file @
237ccd8a
...
...
@@ -380,8 +380,11 @@ static av_always_inline int get_dst_color_err(PaletteUseContext *s,
const
uint8_t
r
=
c
>>
16
&
0xff
;
const
uint8_t
g
=
c
>>
8
&
0xff
;
const
uint8_t
b
=
c
&
0xff
;
uint32_t
dstc
;
const
int
dstx
=
color_get
(
s
,
c
,
a
,
r
,
g
,
b
,
search_method
);
const
uint32_t
dstc
=
s
->
palette
[
dstx
];
if
(
dstx
<
0
)
return
dstx
;
dstc
=
s
->
palette
[
dstx
];
*
er
=
r
-
(
dstc
>>
16
&
0xff
);
*
eg
=
g
-
(
dstc
>>
8
&
0xff
);
*
eb
=
b
-
(
dstc
&
0xff
);
...
...
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