Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
L
libtiff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
libtiff
libtiff
Commits
7ec1d9a4
Commit
7ec1d9a4
authored
1 year ago
by
Su Laus
Browse files
Options
Downloads
Patches
Plain Diff
Check input parameters in _TIFFMergeFields()
Fixes
#624
parent
3dff9205
No related branches found
No related tags found
1 merge request
!559
Fix 624: Check input parameters in _TIFFMergeFields()
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libtiff/tif_dirinfo.c
+12
-2
12 additions, 2 deletions
libtiff/tif_dirinfo.c
with
12 additions
and
2 deletions
libtiff/tif_dirinfo.c
+
12
−
2
View file @
7ec1d9a4
...
...
@@ -574,9 +574,20 @@ int _TIFFMergeFields(TIFF *tif, const TIFFField info[], uint32_t n)
{
static
const
char
module
[]
=
"_TIFFMergeFields"
;
static
const
char
reason
[]
=
"for fields array"
;
/* TIFFField** tp; */
uint32_t
i
;
/* Check input */
if
(
tif
==
NULL
||
info
==
NULL
)
{
TIFFWarningExtR
(
tif
,
module
,
"An input pointer is NULL"
);
return
0
;
}
else
if
(
n
==
0
)
{
TIFFWarningExtR
(
tif
,
module
,
"Number of fields to be merged is zero"
);
return
0
;
}
tif
->
tif_foundfield
=
NULL
;
if
(
tif
->
tif_fields
&&
tif
->
tif_nfields
>
0
)
...
...
@@ -596,7 +607,6 @@ int _TIFFMergeFields(TIFF *tif, const TIFFField info[], uint32_t n)
return
0
;
}
/* tp = tif->tif_fields + tif->tif_nfields; */
for
(
i
=
0
;
i
<
n
;
i
++
)
{
const
TIFFField
*
fip
=
TIFFFindField
(
tif
,
info
[
i
].
field_tag
,
TIFF_ANY
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment