Auto detect if incoming buffer is null-terminated.