kdbus: handle sending messages with any number of vectors 76/159176/4 accepted/tizen/unified/20171115.061201 submit/tizen/20171113.071309
authorAdrian Szyndela <adrian.s@samsung.com>
Mon, 6 Nov 2017 13:53:11 +0000 (14:53 +0100)
committerAdrian Szyndela <adrian.s@samsung.com>
Fri, 10 Nov 2017 11:01:36 +0000 (12:01 +0100)
commit84d166cffc6b417886b2291d7dc508d0d06e82c2
tree34c7e96de0d94e2968949c0f83cc38902f47601d
parentf8143ae098279bd7331c0366cd91216a71edaf4b
kdbus: handle sending messages with any number of vectors

Bugfix. Sending function had an arbitrary limit for kdbus_msg structure size.
Any additional vector added 32 bytes to the structure. Due to the way glib
handles data, in some specific cases number of vectors could increase
significantly, eventually exhausting the limit.
The fix removes the arbitrary limit, exchanging it to standard system memory
limits, by precalculating and allocating needed space, instead of allocating
fixed amount of memory.

Change-Id: I5aa483e26f6bababababadd79422b7abe0b46b7d
gio/gkdbus.c