FA-79162 / Image orientation metadata / Member archive
Segment length limit ignores the length field itself · case 02
A 65534-byte APP1 payload is accepted although its length field would overflow.
Case contract
Input: JPEG segments as [marker, payload] with the payload as a latin-1 string. The stream must start with SOI (0xD8) or the result is "not-jpeg". Scan segments after SOI until SOS (0xDA) or EOI (0xD9); a payload longer than 65533 bytes cannot be encoded in the 16-bit length and yields "corrupt". Return the index of the first APP1 (0xE1) segment whose payload starts with "Exif\0\0", or None.
Why this case matters
Camera, phone and scanner images carry an orientation hint separately from the stored pixels; galleries, thumbnailers, editors and upload pipelines must interpret it consistently or photos appear sideways, mirrored or doubly rotated.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: maximum payload length 0 | null | "corrupt" | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗