Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A possible overflow in cmsIsCLUT #350

Closed
hopper-vul opened this issue Jan 3, 2023 · 0 comments
Closed

A possible overflow in cmsIsCLUT #350

hopper-vul opened this issue Jan 3, 2023 · 0 comments

Comments

@hopper-vul
Copy link

Hi,
when fuzzing the lcms, we found a crash happend in cmsIsCLUT.

In cmsIsCLUT, if the provided UsedDirection is LCMS_USED_AS_INPUT or LCMS_USED_AS_OUTPUT, the TagTable will be assigned with a four-elements array. Whereas when the provided Intent argument greater than four, a overflow as to TabTable will happen, as the following codes show:

 switch (UsedDirection) {
       case LCMS_USED_AS_INPUT: TagTable = Device2PCS16; break;
       case LCMS_USED_AS_OUTPUT:TagTable = PCS2Device16; break;
     ...
    }

return cmsIsTag(hProfile, TagTable[Intent]);  // overflow

Maybe there needs some checks of Intent in cmsIsCLUT? or some constraint description about Intent in doc?

@mm2 mm2 closed this as completed in 6223d3d Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant