Ensure rpmsg channel name is null-terminated

Currently when the rpmsg channel name is copied from the rpmsg device,
the full size of the name array is given to strncpy. This means if there
is no null-terminator in that size, the name will be left unterminated.
To ensure that the name is always null-terminated, the size given to
strncpy is now decreased by one and the name array is zero initialized.

Change-Id: I73b4b597f51a63e5dac23945735f307cb1035e25
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
diff --git a/kernel/ethosu_device.c b/kernel/ethosu_device.c
index 6e2351d..32fb012 100644
--- a/kernel/ethosu_device.c
+++ b/kernel/ethosu_device.c
@@ -334,11 +334,11 @@
 static struct rpmsg_endpoint *ethosu_create_ept(struct rpmsg_device *rpdev)
 {
 	struct device *dev = &rpdev->dev;
-	struct rpmsg_channel_info info;
+	struct rpmsg_channel_info info = { 0 };
 	struct rpmsg_endpoint *ept;
 
 	/* Create rpmsg endpoint */
-	strncpy(info.name, rpdev->id.name, sizeof(info.name));
+	strncpy(info.name, rpdev->id.name, sizeof(info.name) - 1);
 	info.src = 0;
 	info.dst = rpdev->dst;