diff --git a/Gopkg.lock b/Gopkg.lock index 97e792d5f..039afb2f6 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -263,7 +263,7 @@ "exif", "tiff" ] - revision = "fb35d3c3290d09f3524b684b5d42d0063c227158" + revision = "8d986c03457a2057c7b0fb0a48113f7dd48f9619" [[projects]] branch = "master" @@ -349,7 +349,6 @@ "curve25519", "ed25519", "ed25519/internal/edwards25519", - "internal/chacha20", "nacl/secretbox", "openpgp", "openpgp/armor", diff --git a/vendor/github.com/rwcarlsen/goexif/tiff/tag.go b/vendor/github.com/rwcarlsen/goexif/tiff/tag.go index 95d4b28b8..b9ce791f5 100644 --- a/vendor/github.com/rwcarlsen/goexif/tiff/tag.go +++ b/vendor/github.com/rwcarlsen/goexif/tiff/tag.go @@ -179,8 +179,15 @@ func (t *Tag) convertVals() error { switch t.Type { case DTAscii: - if len(t.Val) > 0 { - t.strVal = string(t.Val[:len(t.Val)-1]) // ignore the last byte (NULL). + if len(t.Val) <= 0 { + break + } + nullPos := bytes.IndexByte(t.Val, 0) + if nullPos == -1 { + t.strVal = string(t.Val) + } else { + // ignore all trailing NULL bytes, in case of a broken t.Count + t.strVal = string(t.Val[:nullPos]) } case DTByte: var v uint8