A flaw was found in ImageMagick in coders/webp.c. An attacker who submits a crafted file that is processed by ImageMagick could trigger undefined behavior in the form of math division by zero. The highest threat from this vulnerability is to system availability.
When `image->ticks_per_second` was set to zero, a division by zero error would happen in line 961. So a crafted file may trigger undefined behavior in the form of division by zero. Maybe there need a `PerceptibleReciprocal()` to do division in line 961?

https://github.com/ImageMagick/ImageMagick/blob/74f8868c779a5bde13f594ae12955d5d281ef890/coders/webp.c#L936-L967
Division by zero in WriteAnimatedWEBPImage() in coders/webp.c 
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Division by zero in WriteAnimatedWEBPImage() in coders/webp.c 
Issue date:

--- start body ---
When `image->ticks_per_second` was set to zero, a division by zero error would happen in line 961. So a crafted file may trigger undefined behavior in the form of division by zero. Maybe there need a `PerceptibleReciprocal()` to do division in line 961?

https://github.com/ImageMagick/ImageMagick/blob/74f8868c779a5bde13f594ae12955d5d281ef890/coders/webp.c#L936-L967
--- end body ---

A division by zero vulnerability exists in the WriteAnimatedWEBPImage function of ImageMagick when the ticks_per_second property of an image is set to zero. This can lead to undefined behavior and potential crashes when processing specially crafted WEBP files.