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

add NULL check for mpe in Type_LUT8_Write #410

Closed
wants to merge 1 commit into from

Conversation

x2018
Copy link
Contributor

@x2018 x2018 commented Nov 5, 2023

Fix a potential NULL dereference just like below:

==3959==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x0000006eaa47 bp 0x7fff68d66050 sp 0x7fff68d65d80 T0)
==3959==The signal is caused by a READ memory access.
==3959==Hint: address points to the zero page.
    #0 0x6eaa47 in Type_LUT8_Write Little-CMS-lcms2.15/src/cmstypes.c:1927:15
    #1 0x65610c in SaveTags Little-CMS-lcms2.15/src/cmsio0.c:1380:18
    #2 0x6548eb in cmsSaveProfileToIOhandler Little-CMS-lcms2.15/src/cmsio0.c:1453:10
    #3 0x656c0a in cmsSaveProfileToMem Little-CMS-lcms2.15/src/cmsio0.c:1539:11

This fix refers to the code of Type_LUT16_Write().

@x2018 x2018 closed this Nov 8, 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

Successfully merging this pull request may close these issues.

1 participant