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 70126 - Incorrect server properties can cause a crash when running a query
Incorrect server properties can cause a crash when running a query
Status: RESOLVED FIXED
Product: bonobo-activation [was: oaf]
Classification: Deprecated
Component: general
cvs (head)
Other All
: Normal critical
: ---
Assigned To: Michael Meeks
Michael Meeks
Depends on:
Blocks:
 
 
Reported: 2002-01-31 02:10 UTC by Gustavo Giráldez
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Improved robustness when reading server info properties (3.25 KB, patch)
2002-01-31 02:14 UTC, Gustavo Giráldez
none Details | Review

Description Gustavo Giráldez 2002-01-31 02:10:55 UTC
This is for bonobo-activation, HEAD version, 2002/01/30.

Badly written .server files can cause a crash in bonobo-activation-server
when running a query.  This can happen when server infos have incorrect
properties (missing "name" or "type" attributes, or badly named xml nodes).

How to reproduce:  install a .server file which contains, for example

<oaf_info>
<oaf_server iid="OAFIID:ExampleServer:20000717" type="exe"
	location="./bonobo-activation-empty-server">
    <oaf_attribute name="test" value="test"/>
</oaf_server>
<oaf_server iid="OAFIID:ExampleServer:20000718" type="exe"
	location="./bonobo-activation-empty-server">
    <oaf_attribute type="string" value="idonthaveaname"/>
</oaf_server>
<oaf_server iid="OAFIID:ExampleServer:20000719" type="exe"
	location="./bonobo-activation-empty-server">
    <incorrect_name type="string" value="test"/>
    <oaf_attribute name="test" type="string" value="test"/>
</oaf_server>
</oaf_info>

Any of the previous three cases causes a crash when running
bonobo-activation-run-query.  This is because server properties don't get
filled in server/object-directory-load.c (od_entry_read_props).  Crash
occurs in qexp_evaluate_id (file activation-context-query.c, line 859).

Attached is a patch which fixes these problems and improves robustness in
the function.
Comment 1 Gustavo Giráldez 2002-01-31 02:14:53 UTC
Created attachment 6558 [details] [review]
Improved robustness when reading server info properties
Comment 2 Darin Adler 2002-01-31 06:17:56 UTC
The patch looks good, but it's important that we use xmlFree, not
simply free, to free the result of xmlGetProp. It looks like that
was a pre-existing bug, but the patch makes it particularly obvious.
Comment 3 Luis Villa 2002-03-07 14:26:31 UTC
Reassigning bonobo-activation bugs to michael.
Comment 4 Michael Meeks 2002-03-13 18:06:59 UTC
Added your stuff as a regression test to HEAD bonobo-activation, but
this was already fixed there.

Thanks.