Skip to content

DDS decoder: zero mask triggers ZeroDivisionError in DdsRgbDecoder #9271

@tylzh97

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions