Bug fix: String passing without end character '\0'

Signed-off-by: Leo Ma <leoma@credosemi.com>