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 5a81655 commit a6308e0
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 @@ -15,7 +15,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 @@ -25,6 +25,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 a6308e0

Please sign in to comment.