DBus API problems & UTF-8

Havoc Pennington hp at redhat.com
Mon Jun 12 13:50:23 PDT 2006


Kimmo Hämäläinen wrote:
>> The boolean error code means out of memory _only_. If you provide an 
>> invalid argument, that is _not_ a runtime error, it's a bug in your 
> 
> So, you require that every application verifies the object path, etc.
> before calling DBus API. Ok. What about providing some API to do that?
> Or should every application reimplement the validation code inside DBus?

It would probably be good to have public API for that, sure. It only 
really applies to apps that get an object path from the command line or 
a user though (if you get the path, etc. from dbus, it will already be 
validated)

> UTF-8, NULL are easy to check. But what about valid object paths, for
> example? (Yes, we can replicate the code to every application and create
> wrapper library for D-BUS API, but I think it's not much trouble to have
> it in the DBus client library.)

Sure, that sounds good.

Havoc



More information about the dbus mailing list