since we use read only for text strings so far, we should make sure the buffer is a proper C string