Fix crashes during processing of large animated WebPs

This commit is contained in:
DarthSim
2023-09-08 17:07:09 +03:00
parent b4ee0ceb3e
commit 756958d2ca
5 changed files with 27 additions and 0 deletions

View File

@@ -155,6 +155,12 @@ func transformAnimated(ctx context.Context, img *vips.Image, po *options.Process
}
}()
// Splitting and joining back large WebPs may cause segfault.
// Caching page region cures this
if err = img.LineCache(frameHeight); err != nil {
return err
}
for i := 0; i < framesCount; i++ {
frame := new(vips.Image)