Commit
f88214cf9d66c93f4d22c4c8980de9ee3ff45bab introduced correction
of computing of variable sized elements of arrays. However,
alignment was taken from outer signature instead of type of elements
in the array. For example, for signature "a(sasbttttuii)"
the alignment of elements of the inner array ("as"; should be 1) was computed
from the alignment of "sasbttttuii" (which is 8).
This commit corrects the alignment source.
if (!*offsets)
return -ENOMEM;
- alignment = bus_gvariant_get_alignment(c->signature);
+ alignment = bus_gvariant_get_alignment(contents);
assert(alignment > 0);
for (i = 0; i < *n_offsets; i++) {