Skip to content

Commit

Permalink
Enable HEIF SafeEncoding to fix occasional SIGSEGV
Browse files Browse the repository at this point in the history
  • Loading branch information
fkleon committed Jan 19, 2025
1 parent 0aef999 commit 36edf0f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"gitlab.com/golang-utils/image2/jpeg"

"github.com/disintegration/imaging"
_ "github.com/jdeng/goheif"
goheif "github.com/jdeng/goheif"
"github.com/mholt/goexif2/exif"
pngembed "github.com/sabhiram/png-embed"
_ "golang.org/x/image/bmp"
Expand All @@ -24,6 +24,10 @@ import (
_ "golang.org/x/image/webp"
)

func init() {
goheif.SafeEncoding = true
}

// Skip Writer for exif writing
type writerSkipper struct {
w io.Writer
Expand Down

0 comments on commit 36edf0f

Please sign in to comment.