[PATCH] various fixes for marshlling empty fixed type arrays

Rob Taylor robtaylor at floopily.org
Tue Feb 7 08:29:38 PST 2006

Havoc Pennington wrote:
> Hi,
> I think there's probably a better way to fix the dbus-marshal-basic.c
> issue (I'm not sure where it was breaking); the functions called there
> should allow a length of 0, so I'm guessing the problem was a NULL
> array_start or something? If so perhaps making dbus_string_copy allow a
> NULL string when length is 0 would be a nicer fix.

Sorry, I missed this part of your mail earlier. The issue is that
_dbus_string_init_const_len asserts that the pointer is not null
regardless of string length. So possibly there should be a fix there. I
added the check here as a) it nonobvious whether that assert is
incorrect and b) more efficient to just do neither of these calls... ;)

Rob Taylor

More information about the dbus mailing list