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
320ae9fb
Commit
320ae9fb
authored
Dec 07, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sws_scale: check input against NULL
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
710c4baf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
swscale.c
libswscale/swscale.c
+9
-2
No files found.
libswscale/swscale.c
View file @
320ae9fb
...
...
@@ -789,10 +789,17 @@ int attribute_align_arg sws_scale(struct SwsContext *c,
const
int
dstStride
[])
{
int
i
,
ret
;
const
uint8_t
*
src2
[
4
]
=
{
srcSlice
[
0
],
srcSlice
[
1
],
srcSlice
[
2
],
srcSlice
[
3
]
}
;
uint8_t
*
dst2
[
4
]
=
{
dst
[
0
],
dst
[
1
],
dst
[
2
],
dst
[
3
]
}
;
const
uint8_t
*
src2
[
4
];
uint8_t
*
dst2
[
4
];
uint8_t
*
rgb0_tmp
=
NULL
;
if
(
!
srcSlice
||
!
dstStride
||
!
dst
||
!
srcSlice
)
{
av_log
(
c
,
AV_LOG_ERROR
,
"One of the input parameters to sws_scale() is NULL, please check the calling code
\n
"
);
return
0
;
}
memcpy
(
src2
,
srcSlice
,
sizeof
(
src2
));
memcpy
(
dst2
,
dst
,
sizeof
(
dst2
));
// do not mess up sliceDir if we have a "trailing" 0-size slice
if
(
srcSliceH
==
0
)
return
0
;
...
...
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