Skip to content

Conversation

@radarhere
Copy link
Member

Taking a part of #2288

At the moment, COLORMAP is the TiffImagePlugin blocklist, tags that are blocked when saving.

# The other tags expect arrays with a certain length (fixed or depending on
# BITSPERSAMPLE, etc), passing arrays with a different length will result in
# segfaults. Block these tags until we add extra validation.
blocklist = [
COLORMAP,

This PR adds that validation, throwing an error if it does not have length 768.

The tag is treated as special when writing because libtiff handles it specially - https://gitlab.com/libtiff/libtiff/-/blob/master/libtiff/tif_dir.c#L374-379

@radarhere radarhere added the TIFF label May 26, 2020
@hugovk hugovk merged commit 7dd8837 into python-pillow:master Jun 25, 2020
@radarhere radarhere deleted the blocklist branch June 25, 2020 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants