Eliminate unsafe C api usage and warnings

* Replace strcpy/strncpy by length check and memcpy
* Fix memcpy calls with NULL parameters
* Fix uninitialized variable

Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: Ic7c978cd510a9c4ddf5daa18ffe215c9e8c98cf1
7 files changed