On Mon, Jan 26, 2009 at 3:27 AM, the Adib <theadib@...1439...> wrote:
there is this bug report about inkscape crash on invalid svg input file: https://bugs.launchpad.net/inkscape/+bug/320987
The question here: Is there any standardized method how to handle invalid input files?
Depends on how invalid it is :) Without looking at the code, purely from experience: rename some zip to svg and try to open it. It won't crash but show a message telling it couldn't open it.
Once it's past the XML parser, as in your example, we need to carefully protect lots of pieces of code against junk. There's no easy immediate solution. For example, specifically for NaNs in numeric values, I remember some fix being made some time ago, but probably it was in a different place (probably in path reading code).