Skip to content

Manipulating .cr2 file crashes Python process (signal 11) #3786

@timo-piirmann

Description

@timo-piirmann

What did you do?

I was trying to open and save .cr2 image in another format.

What did you expect to happen?

I expected the file to be saved OR at least raise some kind of exception why it couldn't be done. Anything I could work with

What actually happened?

Python process crashed with the following message:

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

What are your OS, Python and Pillow versions?

  • OS: macOS Mojave
  • Python: 3.6.6
  • Pillow: 6.0.0
from PIL import Image

img = Image.open("file_1.cr2")
del img.tag_v2[700]

img.save("new_file.tif")

In Pillow 5.4.1 this file wasn't identified by Pillow as image and so the code just skipped this part. But in 6.0.0 Pillow does identify it as image but after that things blow up.

image.CR2.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAny unexpected behavior, until confirmed feature.TIFF

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions