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
5561a1de
Commit
5561a1de
authored
Oct 22, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_premultiply: fix signed integer overflow
Fixes #8324
parent
0b8956b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vf_premultiply.c
libavfilter/vf_premultiply.c
+2
-2
No files found.
libavfilter/vf_premultiply.c
View file @
5561a1de
...
...
@@ -186,7 +186,7 @@ static void premultiply16yuv(const uint8_t *mmsrc, const uint8_t *aasrc,
for
(
y
=
0
;
y
<
h
;
y
++
)
{
for
(
x
=
0
;
x
<
w
;
x
++
)
{
dst
[
x
]
=
((((
msrc
[
x
]
-
half
)
*
(((
asrc
[
x
]
>>
1
)
&
1
)
+
asrc
[
x
])))
>>
shift
)
+
half
;
dst
[
x
]
=
((((
msrc
[
x
]
-
half
)
*
(
int64_t
)(
((
asrc
[
x
]
>>
1
)
&
1
)
+
asrc
[
x
])))
>>
shift
)
+
half
;
}
dst
+=
dlinesize
/
2
;
...
...
@@ -209,7 +209,7 @@ static void premultiply16offset(const uint8_t *mmsrc, const uint8_t *aasrc,
for
(
y
=
0
;
y
<
h
;
y
++
)
{
for
(
x
=
0
;
x
<
w
;
x
++
)
{
dst
[
x
]
=
((((
msrc
[
x
]
-
offset
)
*
(((
asrc
[
x
]
>>
1
)
&
1
)
+
asrc
[
x
]))
+
half
)
>>
shift
)
+
offset
;
dst
[
x
]
=
((((
msrc
[
x
]
-
offset
)
*
(
int64_t
)(
((
asrc
[
x
]
>>
1
)
&
1
)
+
asrc
[
x
]))
+
half
)
>>
shift
)
+
offset
;
}
dst
+=
dlinesize
/
2
;
...
...
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