Skip to content

image/jpeg: decoding fails when image ends with "\xff\x00\xff\xd9" #4705

Closed
@nigeltao

Description

@nigeltao
The person who sent me the attached JPEG says that it's viewable from C (presumably
libjpeg). Go fails with "unknown marker" because the "\xff\x00" is
interpreted as a marker instead of a 0 byte for the Huffman decoder. I'm not sure yet if
the image is actually spec-compliant or if libjpeg is being liberal in what it accepts.

Attachments:

  1. sample.jpg (5063 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions