Re: [CrystalSpace] #990: NULL pointer crash if library file doesn't contain <library> tag (fix included)
"CrystalSpace" <[email protected]> Sun, 21 Jul 2013 22:03:54 -0000
| Newsgroups | gmane.comp.graphics.crystalspace.tracker |
|---|---|
| Message-ID | <[email protected]> |
#990: NULL pointer crash if library file doesn't contain <library> tag (fix
included)
----------------------------+-----------------------------------------------
Reporter: ralphcampbell | Owner: sunshine
Type: defect | Status: closed
Priority: major | Milestone:
Component: loader | Version: V2.1
Resolution: fixed | Keywords:
----------------------------+-----------------------------------------------
Changes (by sunshine):
* status: accepted => closed
* resolution: => fixed
Comment:
A couple observations:
- The `csparser` include mechanism is not textual like C `#include`. An
included XML document needs to be well-formed, meaning that it must have a
root node. I can imagine that the reason for requiring the included
document to have a root-level `<library>` node may have been to emphasize
this, so that people do not falsely believe that they can construct the
included document arbitrarily. I sympathize with the convenience of being
able to omit the root-level `<library>`, but I also can understand the
motivation for requiring it.
- Your patch touches `LoadLibraryFromNode()`, however,
`LoadLibraryFile()` faces the same issue and deals with it by reporting an
error rather than opting for convenience. For consistency, they should
behave similarly. In this case, it probably makes sense to maintain the
''status quo'' and report an error.
Resolved by r39504.
--
Ticket URL: <http://www.crystalspace3d.org/trac/CS/ticket/990#comment:3>
CrystalSpace <http://www.crystalspace3d.org/>
Free open-source 3D SDK.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk