Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
jasper.25970
jasper-CVE-2021-3272.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File jasper-CVE-2021-3272.patch of Package jasper.25970
Index: jasper-1.900.14/src/libjasper/jp2/jp2_dec.c =================================================================== --- jasper-1.900.14.orig/src/libjasper/jp2/jp2_dec.c +++ jasper-1.900.14/src/libjasper/jp2/jp2_dec.c @@ -250,7 +250,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? */ @@ -273,7 +273,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 { @@ -392,6 +392,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(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