mirror of https://github.com/perkeep/perkeep.git
goexif: fix crash observed in the wild.
Reported by ajft@ajft.org Change-Id: I4d4ddc998bb07f75d484341b8e423151d6c1aaa0
This commit is contained in:
parent
0dea7eae9b
commit
02a95a503d
|
@ -114,7 +114,9 @@ func (t *Tag) convertVals() {
|
|||
|
||||
switch t.Fmt {
|
||||
case 2: // ascii string
|
||||
t.strVal = string(t.Val[:len(t.Val)-1])
|
||||
if len(t.Val) > 0 {
|
||||
t.strVal = string(t.Val[:len(t.Val)-1])
|
||||
}
|
||||
case 1:
|
||||
var v uint8
|
||||
t.intVals = make([]int64, int(t.Ncomp))
|
||||
|
|
Loading…
Reference in New Issue