hardware/intel/libva
Revision | 08fd3ba492333d94256929ccf52d7eebf9eca134 (tree) |
---|---|
Zeit | 2013-06-19 15:26:05 |
Autor | Austin Yuan <shengquan.yuan@inte...> |
Commiter | Xiang, Haihao |
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)
@@ -88,7 +88,8 @@ int va_parseConfig(char *env, char *env_value) | ||
88 | 88 | /* no setting in config file, use env setting */ |
89 | 89 | value = getenv(env); |
90 | 90 | if (value) { |
91 | - strncpy(env_value, value, 1024); | |
91 | + if (env_value) | |
92 | + strncpy(env_value, value, 1024); | |
92 | 93 | return 0; |
93 | 94 | } |
94 | 95 |