if (!BUS_MESSAGE_IS_GVARIANT(m))
return 0;
- p = c->signature;
+ p = strempty(c->signature);
while (*p != 0) {
size_t n;
if (!a)
return -ENOMEM;
- p = c->signature;
+ p = strempty(c->signature);
for (i = 0, j = 0; i < c->n_offsets; i++) {
unsigned k;
size_t n;
int r;
assert(m);
- assert(signature);
assert(item_size);
assert(offsets);
assert(n_offsets);
+ if (isempty(signature)) {
+ *item_size = 0;
+ *offsets = NULL;
+ *n_offsets = 0;
+ return 0;
+ }
+
sz = determine_word_size(size, 0);
+ if (sz <= 0)
+ return -EBADMSG;
/* First, loop over signature and count variable elements and
* elements in general. We use this to know how large the
assert_return(m, NULL);
c = complete ? &m->root_container : message_get_container(m);
- return c->signature ?: "";
+ return strempty(c->signature);
}
_public_ int sd_bus_message_copy(sd_bus_message *m, sd_bus_message *source, int all) {