diff options
author | Cameron Moore <moorereason@gmail.com> | 2021-03-13 09:21:30 -0600 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-03-13 21:20:10 +0100 |
commit | 0a2ab3f8feb961f8394b1f9964fab36bfa468027 (patch) | |
tree | 15f7f41a2bb9f657de2d6c39e5c948a8a9281492 /resources/images/exif/exif.go | |
parent | 4d24e2a3261d8c7dc0395db3ac4de89ebb0974a5 (diff) |
exif: Allow more spacing characters in strings
The root cause of issue #8079 was a non-breaking space (U+0160).
`unicode.IsPrint` only allows the ASCII space (U+0020). Be more lenient
by using `unicode.IsGraphic` instead.
Fixes #8079
Diffstat (limited to 'resources/images/exif/exif.go')
-rw-r--r-- | resources/images/exif/exif.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/resources/images/exif/exif.go b/resources/images/exif/exif.go index 720d200c9..065c14355 100644 --- a/resources/images/exif/exif.go +++ b/resources/images/exif/exif.go @@ -227,7 +227,7 @@ func (e *exifWalker) Walk(f _exif.FieldName, tag *tiff.Tag) error { func nullString(in []byte) string { var rv bytes.Buffer for _, b := range in { - if unicode.IsPrint(rune(b)) { + if unicode.IsGraphic(rune(b)) { rv.WriteByte(b) } } |