GNOME Bugzilla – Bug 509608
"Cool Metal": bumpmap plug-in fails
Last modified: 2008-01-15 12:27:47 UTC
When using the "Cool Metal" filter (or logo) with option "Effect size" (or "Font size") less than 20, the call of the bumpmap plug-in fails with error message "Floating point exception": In the 'apply-cool-metal-logo-effect' routine, 'plug-in-bump-map' is called with argument depth := size / 20. Obviously for depth < 1 the passed integer value is 0, and then the bumpmap code "nz = (6 * 255) / bmvals.depth;" causes a division by zero. Note that there are more affected plug-ins: <Toolbox>/Xtns/Buttons/Round Button (option "Bevel Width"), <Toolbox>/Xtns/Patterns/Swirl-Tile (option "Depth"), and any non-standard plug-in may be affected as well.
Created attachment 102893 [details] [review] Bugfix
Thanks a lot. I have applied this change to both branches: 2008-01-15 Sven Neumann <sven@gimp.org> * plug-ins/common/bumpmap.c * plug-ins/script-fu/scripts/swirltile.scm: applied patch from Ulf-D. Ehlert that catches a potential division by zero in the Bumpmap plug-in and adjusts the range of the Depth parameter in the Swirl-Tile script (bug #509608).