diff options
author | Austin Yuan <shengquan.yuan@intel.com> | 2012-12-27 18:00:30 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2013-06-19 14:26:05 +0800 |
commit | 08fd3ba492333d94256929ccf52d7eebf9eca134 (patch) | |
tree | 6338c28c889d10293eb9993aaa1c56f14ae1f41b /va | |
parent | f27e9dc9c427dddd019a7cd09da0a97810b60a1d (diff) |
va_parseConfig: still need to check env_value
env_value may be NULL which means the caller doens't
care the value of the environment variable, just check
if it is set.
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit 2e11d2273b2974a7d1959cbcaf8db5b8e9aedd9e)
Diffstat (limited to 'va')
-rw-r--r-- | va/va.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -88,7 +88,8 @@ int va_parseConfig(char *env, char *env_value) /* no setting in config file, use env setting */ value = getenv(env); if (value) { - strncpy(env_value, value, 1024); + if (env_value) + strncpy(env_value, value, 1024); return 0; } |