[PATCH openEuler-1.0-LTS] bna: ensure the copied buf is NUL terminated