Skip to content

DDS decoder: zero mask triggers ZeroDivisionError in DdsRgbDecoder #9271

Description

@tylzh97

What did you do?

from PIL import Image

with Image.open("poc.dds") as img:
    img.load()

What did you expect to happen?

Image.UnidentifiedImageError

What actually happened?

ZeroDivisionError: division by zero

What are your OS, Python and Pillow versions?

  • OS: Ubuntu 22.04
  • Python: 3.10.18
  • Pillow: 12.0.0 (latest)

poc.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions