Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
f439fc43
Commit
f439fc43
authored
Apr 20, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14373 from alalek:oss_fuzz_14185_14321
parents
c024edb9
25247b9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
grfmt_tiff.cpp
modules/imgcodecs/src/grfmt_tiff.cpp
+8
-3
No files found.
modules/imgcodecs/src/grfmt_tiff.cpp
View file @
f439fc43
...
...
@@ -401,9 +401,14 @@ bool TiffDecoder::readData( Mat& img )
(
!
is_tiled
&&
tile_height0
==
std
::
numeric_limits
<
uint32
>::
max
())
)
tile_height0
=
m_height
;
CV_Assert
((
int
)
tile_width0
>
0
&&
(
int
)
tile_width0
<
std
::
numeric_limits
<
int
>::
max
());
CV_Assert
((
int
)
tile_height0
>
0
&&
(
int
)
tile_height0
<
std
::
numeric_limits
<
int
>::
max
());
CV_Assert
(((
uint64_t
)
tile_width0
*
tile_height0
*
ncn
*
(
bpp
/
bitsPerByte
)
<
(
CV_BIG_UINT
(
1
)
<<
30
))
&&
"TIFF tile size is too large: >= 1Gb"
);
const
int
TILE_MAX_WIDTH
=
(
1
<<
24
);
const
int
TILE_MAX_HEIGHT
=
(
1
<<
24
);
CV_Assert
((
int
)
tile_width0
>
0
&&
(
int
)
tile_width0
<=
TILE_MAX_WIDTH
);
CV_Assert
((
int
)
tile_height0
>
0
&&
(
int
)
tile_height0
<=
TILE_MAX_HEIGHT
);
const
uint64_t
MAX_TILE_SIZE
=
(
CV_BIG_UINT
(
1
)
<<
30
);
CV_CheckLE
((
int
)
ncn
,
4
,
""
);
CV_CheckLE
((
int
)
bpp
,
64
,
""
);
CV_Assert
(((
uint64_t
)
tile_width0
*
tile_height0
*
ncn
*
std
::
max
(
1
,
(
int
)(
bpp
/
bitsPerByte
))
<
MAX_TILE_SIZE
)
&&
"TIFF tile size is too large: >= 1Gb"
);
if
(
dst_bpp
==
8
)
{
...
...
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