summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDEEPAK SINGH <deepak.sn@samsung.com>2020-08-14 15:33:57 +0530
committerHyotaek Shim <hyotaek.shim@samsung.com>2020-08-27 10:36:51 +0000
commitd52db58b034883fcc08dd52de4ad1e310d205b44 (patch)
tree8ed8401f7bf26b8635d19510a2ffab12901276cd
parentd66ea0f0cc28d56b77401d3b03d4f65d19e284db (diff)
downloaddbus-d52db58b034883fcc08dd52de4ad1e310d205b44.tar.gz
dbus-d52db58b034883fcc08dd52de4ad1e310d205b44.tar.bz2
dbus-d52db58b034883fcc08dd52de4ad1e310d205b44.zip
Change-Id: I68962e09d1c2c8ef367a4766c23e7b15cf1e6dc1 Signed-off-by: Deepak Singh <deepak.sn@samsung.com>
-rw-r--r--dbus/dbus-marshal-gvariant.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/dbus/dbus-marshal-gvariant.c b/dbus/dbus-marshal-gvariant.c
index 85e53cdf..7a456c0a 100644
--- a/dbus/dbus-marshal-gvariant.c
+++ b/dbus/dbus-marshal-gvariant.c
@@ -231,6 +231,9 @@ _dbus_header_fill_cache (DBusHeader *header,
if (get_header_array_size (header) > 0)
{
header->fields[get_field_after (array_buffer, 0)].value_pos = FIELD_ID_SIZE + FIRST_GVARIANT_FIELD_OFFSET;
+ if (n_fields_offsets == 0)
+ return;
+
for (i=0; i < n_fields_offsets-1; i++)
{
dbus_uint64_t field = get_field_after (array_buffer, fields_offsets[i]);