Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-15-SP1:GA
tiff.31772
tiff-CVE-2022-22844.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tiff-CVE-2022-22844.patch of Package tiff.31772
Index: tiff-4.0.9/tools/tiffset.c =================================================================== --- tiff-4.0.9.orig/tools/tiffset.c +++ tiff-4.0.9/tools/tiffset.c @@ -33,6 +33,7 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <stdint.h> #include "tiffio.h" @@ -134,9 +135,19 @@ main(int argc, char* argv[]) arg_index++; if (TIFFFieldDataType(fip) == TIFF_ASCII) { - if (TIFFSetField(tiff, TIFFFieldTag(fip), argv[arg_index]) != 1) - fprintf( stderr, "Failed to set %s=%s\n", - TIFFFieldName(fip), argv[arg_index] ); + if(TIFFFieldPassCount( fip )) { + size_t len; + len = strlen(argv[arg_index]) + 1; + if (len > UINT16_MAX || TIFFSetField(tiff, TIFFFieldTag(fip), + (uint16_t)len, argv[arg_index]) != 1) + fprintf( stderr, "Failed to set %s=%s\n", + TIFFFieldName(fip), argv[arg_index] ); + } else { + if (TIFFSetField(tiff, TIFFFieldTag(fip), + argv[arg_index]) != 1) + fprintf( stderr, "Failed to set %s=%s\n", + TIFFFieldName(fip), argv[arg_index] ); + } } else if (TIFFFieldWriteCount(fip) > 0 || TIFFFieldWriteCount(fip) == TIFF_VARIABLE) { int ret = 1;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor