Fix possible buffer overflow
Fix possible buffer overflow

NULL terminate and truncate size of copy into char buffer to the right size.

Signed-off-by: Ananth N Mavinakayanahalli <7dc108d19a2513f6455353af182b9e4d3b794ec9@in.ibm.com>
Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.vnet.ibm.com>

qemu/skiboot,legoater/skiboot,shenki/skiboot,shenki/skiboot,shenki/skiboot,shenki/skiboot,open-power/skiboot,legoater/skiboot,mikey/skiboot,legoater/skiboot,open-power/skiboot,ddstreet/skiboot,open-power/skiboot,csmart/skiboot,legoater/skiboot,mikey/skiboot,csmart/skiboot,qemu/skiboot,apopple/skiboot,stewart-ibm/skiboot,mikey/skiboot,qemu/skiboot,legoater/skiboot,open-power/skiboot,stewart-ibm/skiboot,ddstreet/skiboot,open-power/skiboot,apopple/skiboot,csmart/skiboot,qemu/skiboot,ddstreet/skiboot,shenki/skiboot,qemu/skiboot,stewart-ibm/skiboot,apopple/skiboot