util: Fix and replace nullvec2str utility function with concatenate() 47/190547/9
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Tue, 6 Nov 2018 23:21:26 +0000 (00:21 +0100)
committerKarol Lewandowski <lmctl@lmctl.net>
Wed, 7 Nov 2018 22:49:07 +0000 (23:49 +0100)
commit8f8c0ba615a88de9c78d6b24f3ce0470c7015cbd
treeece748ff50bc47bc82e2dd5673b8c061bd25ef03
parent236600bdad00d1f53b4221e0cac4a47bc64d1645
util: Fix and replace nullvec2str utility function with concatenate()

Multiple issues were found and fixed in previously-unused nullvec2str
function, including major problem with possible stack corruption via
long parameters.

This commit completely rewrites the function to dynamically resize the
buffer while appending new parameters to avoid previous problems.

Additionally, name is changed to somewhat more developer friendly name.

Influenced-by: Mateusz Mościcki and Michał Bloch
Change-Id: Ia97e3851bb4b5779a14704098752e3644c487f0b
src/shared/util.c
src/shared/util.h