[PATCH 08/10] env: Use strncpy() instead of ad-hoc code to copy variable value