drewnoakes/metadata-extractor

Treat \0 as terminator in IPTC strings

Aperta

#122 aperta il 4 set 2015

 (1 commento) (0 reazioni) (0 assegnatari)Java (470 fork)batch import
bugformat-iptcgood-first-issuehelp wantedimage-queue

Metriche repository

Star
 (2411 stelle)
Metriche merge PR
 (Merge medio 3g 2h) (2 PR mergiate in 30 g)

Descrizione

The below image, when passed through exiftool, reads the IPTC Source as "Getty Images North America".

When read with the IptcDirectory we're getting "Getty Images ����". On closer inspection it looks something more like: "Getty Images\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0003\u0000\u0000\u0000\u0005\u0000\u0000\u0000\n����".

The null character is often used to denote the end of a string - is this being respected? Or not as it's not part of the standard?

getty-borked

Guida contributor