After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 302907 - rsvg program doesn't handle -h 0 or -w 0 well
rsvg program doesn't handle -h 0 or -w 0 well
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
2.9.x
Other Linux
: Normal minor
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2005-05-03 20:11 UTC by Josselin Mouette
Modified: 2005-07-01 02:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Josselin Mouette 2005-05-03 20:11:03 UTC
Version details: 2.8.1
Distribution/Version: Debian sid

[ forwarded from http://bugs.debian.org/278750 ]

If I call "rsvg -w 30 -h 0 foo.svg foo.png", rsvg gives a cryptic 
warning and a random bogus output PNG.  It should give a useful error 
message and (I think) no output PNG.

(process:26064): librsvg-WARNING **: rsvg_start_svg: width and height 
not specified in the SVG, nor supplied by the size callback

The same is true if a negative value is given.


An easy fix would be to test for width or height <=0 instead of testing for ==
-1, but I don't know if that's the best solution.
Comment 1 Dominic Lachowicz 2005-07-01 02:19:24 UTC
HEAD doesn't emit bogus output. that's good enough. GIGO. thanks.