ubootenv: CB1 Fix Coverity Check error [1/1]

PD#SWPL-171583

Problem:
Coverity check requirement

Solution:
1,Reduce the crash probability when calling "bootenv_get_value"
2,Using strncpy instead of strcpy to reduce the probability of crash
3,Optimize the fclose error handling process

Verify:
jenkins

Signed-off-by: zhenyu.gao <zhenyu.gao@amlogic.com>
Change-Id: Iea8f056e622a47aa02a34aa28746131a0b221757
1 file changed