Closed Bug 468291 Opened 17 years ago Closed 16 years ago

CID: 1236 [@ cmsGetDeviceClass] Intent flag lost by cmsGetDeviceClass from CreateProof

Categories

(Core :: Graphics: Color Management, defect)

defect
Not set
critical

Tracking

()

RESOLVED WONTFIX

People

(Reporter: timeless, Assigned: bholley)

References

(Blocks 1 open bug, )

Details

(Keywords: coverity, crash)

Crash Data

Attachments

(1 file)

Checker: FORWARD_NULL (help) File: base/src/mozilla/modules/lcms/src/cmsxform.c Function: CreateProof Description: Variable "(p)->PreviewProfile" tracked as NULL was passed to a function that dereferences it. 562 icProfileClassSignature LCMSEXPORT cmsGetDeviceClass(cmsHPROFILE hProfile) 564 LPLCMSICCPROFILE Icc = (LPLCMSICCPROFILE) hProfile; Event deref_var: Dereference of local "Icc" that aliases parameter 565 return Icc -> DeviceClass; -- 1705 LCMSBOOL LCMSEXPORT cmsIsIntentSupported(cmsHPROFILE hProfile, 1706 int Intent, int UsedDirection) 1709 icTagSignature* TagTable; checking for 'Intent = 0' would avoid this crash 1713 if (cmsGetDeviceClass(hProfile) != icSigLinkClass) { -- 794 LPLUT ComputeGamutWithInput(cmsHPROFILE hInput, cmsHPROFILE hProfile, int Intent) 816 if (!cmsIsIntentSupported(hProfile, Intent, LCMS_USED_AS_INPUT) && -- 905 LPLUT _cmsComputeGamutLUT(cmsHPROFILE hProfile, int Intent) 907 return ComputeGamutWithInput(NULL, hProfile, Intent); -- 1149 void CreateProof(_LPcmsTRANSFORM p, icTagSignature *ToTagPtr) 1152 icTagSignature ProofTag; 1153 1154 if (p -> dwOriginalFlags & cmsFLAGS_SOFTPROOFING) { 1159 p -> Preview = _cmsComputeSoftProofLUT(p ->PreviewProfile, p ->Intent); 1162 // That's a proofing transfor, so use second intent for output. I wouldn't cry if someone fixed the typo of 'transform' here... 1164 *ToTagPtr = PCS2Device[p->ProofIntent]; 1166 if (p -> Preview == NULL) { 1168 ProofTag = Preview[p -> Intent]; 1170 if (!cmsIsTag(p ->PreviewProfile, ProofTag)) { 1172 ProofTag = Preview[0]; 1177 if (ProofTag) { 1183 else Event assign_zero: Variable "(p)->PreviewProfile" assigned value 0. 1186 p ->PreviewProfile = NULL; 1197 if ((p -> dwOriginalFlags & cmsFLAGS_GAMUTCHECK) && (p -> dwOriginalFlags & cmsFLAGS_NOTPRECALC)) { Event var_deref_model: Variable "(p)->PreviewProfile" tracked as NULL was passed to a function that dereferences it. [model] 1200 p -> Gamut = _cmsComputeGamutLUT(p->PreviewProfile, p ->Intent);
Component: ImageLib → GFX: Color Management
QA Contact: imagelib → color-management
Attached patch fixSplinter Review
added a fix - flagging vlad for review
Attachment #352053 - Flags: review?(vladimir)
FWIW - This code is never reached by mozilla because we call cmsCreateTransform only, which in turn calls cmsCreateProofingTransform with the Proofing Profile set to null. The offending code only gets called if the Proofing Profile is not null. Fix is simple enough though - might as well land it.
what is the next step on this one?
this bug is obsoleted by bug 481926 - what's the appropriate way to resolve?
modules/lcms/ is gone.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
Crash Signature: [@ cmsGetDeviceClass]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: