Bug Description

Binary package hint: rmagic

Using Ubuntu 8.10,

Although the error message comes from libgd, it's due to the code in the Settings.pm file referred to below. The problem is that this perl script tries to create a 0x0 image, which apparently worked with earlier versions of libgd.

I expected rmagic (called from a complex PERL script) to generate a report from the output of analog. Instead, no report, and the error message:

gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
Can't call method "can" on an undefined value at /usr/share/rmagic/wadg/rm/Settings.pm line 928.

Here is a fix that worked for me, Settings-orig.pm is the version of Settings.pm which came with the package.