From 8526739066ccb00ccd24b74650a7d7b284442985 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 21 Jun 2018 13:10:40 -0700 Subject: MM-10934 Update server dependencies. (#8981) * Changing throttled import path. * Upgrading dependencies. --- vendor/github.com/rwcarlsen/goexif/tiff/tag.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/rwcarlsen') 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 -- cgit v1.2.3-1-g7c22