check_offsets_in_body_for_adding() is called only when former data is not fixed
sized data. If former written data is fixed size one (e.g. integer, boolean..)
it skips to update offset bytes size even message body size exceeds its limits.
It results invalid memory access on reciever-side.
This patch fixes it to update offset bytes size whenever message is appended.
Change-Id: I2b94955d40debc5129b5f3c193e197efb542141b
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
if (writer->body_container)
{
+ check_offsets_in_body_for_adding (writer);
+
if (*writer->u.root.last_offset != 0)
{
- check_offsets_in_body_for_adding (writer);
-
write_offset (writer->value_str,
*writer->u.root.last_offset,
writer->offsets_size,