proto: Fix possible buffer overflow due to non null terminated string