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
f97e28eb
Commit
f97e28eb
authored
Jun 06, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/lut3d: add sanity checks.
Should fix CID1026775 and CID1026774.
parent
d5978c86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
vf_lut3d.c
libavfilter/vf_lut3d.c
+8
-2
No files found.
libavfilter/vf_lut3d.c
View file @
f97e28eb
...
...
@@ -265,8 +265,8 @@ static int parse_cube(AVFilterContext *ctx, FILE *f)
int
i
,
j
,
k
;
const
int
size
=
strtol
(
line
+
12
,
NULL
,
0
);
if
(
size
>
MAX_LEVEL
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Too large
3D LUT
\n
"
);
if
(
size
<
2
||
size
>
MAX_LEVEL
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Too large
or invalid 3D LUT size
\n
"
);
return
AVERROR
(
EINVAL
);
}
lut3d
->
lutsize
=
size
;
...
...
@@ -370,6 +370,12 @@ static int parse_m3d(AVFilterContext *ctx, FILE *f)
av_log
(
ctx
,
AV_LOG_ERROR
,
"in and out must be defined
\n
"
);
return
AVERROR_INVALIDDATA
;
}
if
(
in
<
2
||
out
<
2
||
in
>
MAX_LEVEL
*
MAX_LEVEL
*
MAX_LEVEL
||
out
>
MAX_LEVEL
*
MAX_LEVEL
*
MAX_LEVEL
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"invalid in (%d) or out (%d)
\n
"
,
in
,
out
);
return
AVERROR_INVALIDDATA
;
}
for
(
size
=
1
;
size
*
size
*
size
<
in
;
size
++
);
lut3d
->
lutsize
=
size
;
scale
=
1
.
/
(
out
-
1
);
...
...
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