Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP4:Update
jasper
jasper-CVE-2021-3272.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File jasper-CVE-2021-3272.patch of Package jasper
Index: jasper-2.0.14/src/libjasper/jp2/jp2_dec.c =================================================================== --- jasper-2.0.14.orig/src/libjasper/jp2/jp2_dec.c +++ jasper-2.0.14/src/libjasper/jp2/jp2_dec.c @@ -253,7 +253,7 @@ jas_image_t *jp2_decode(jas_stream_t *in with the data in the code stream? */ if ((samedtype && dec->ihdr->data.ihdr.bpc != JP2_DTYPETOBPC(dtype)) || (!samedtype && dec->ihdr->data.ihdr.bpc != JP2_IHDR_BPCNULL)) { - jas_eprintf("warning: component data type mismatch\n"); + jas_eprintf("warning: component data type mismatch (IHDR)\n"); } /* Is the compression type supported? */ @@ -276,7 +276,7 @@ jas_image_t *jp2_decode(jas_stream_t *in ++i) { if (jas_image_cmptdtype(dec->image, i) != JP2_BPCTODTYPE(dec->bpcc->data.bpcc.bpcs[i])) { - jas_eprintf("warning: component data type mismatch\n"); + jas_eprintf("warning: component data type mismatch (BPCC)\n"); } } } else { @@ -395,6 +395,14 @@ jas_image_t *jp2_decode(jas_stream_t *in } } + /* Ensure that the number of channels being used by the decoder + * matches the number of image components. */ + if (dec->numchans != jas_image_numcmpts(dec->image)) { + jas_eprintf("error: mismatch in number of components (%d != %d)\n", + dec->numchans, jas_image_numcmpts(dec->image)); + goto error; + } + /* Mark all components as being of unknown type. */ for (i = 0; i < JAS_CAST(jas_uint, jas_image_numcmpts(dec->image)); ++i) {
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