mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
computeinfo: fix use of uninitialized config_size_ret (#1727)
The variable `config_size_ret` is only assigned to inside the `if`. If the condition is false, we would read uninitialized data. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
8f3027387a
commit
4f62adf1ca
@@ -439,8 +439,8 @@ int getPlatformConfigInfo(cl_platform_id platform, config_info* info)
|
||||
err = clGetPlatformInfo(platform, info->opcode, config_size_set,
|
||||
&info->config.cl_name_version_single,
|
||||
&config_size_ret);
|
||||
}
|
||||
size_err = config_size_set != config_size_ret;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
log_error("Unknown config type: %d\n", info->config_type);
|
||||
@@ -585,8 +585,8 @@ int getConfigInfo(cl_device_id device, config_info* info)
|
||||
err = clGetDeviceInfo(device, info->opcode, config_size_set,
|
||||
&info->config.cl_name_version_single,
|
||||
&config_size_ret);
|
||||
}
|
||||
size_err = config_size_set != config_size_ret;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
log_error("Unknown config type: %d\n", info->config_type);
|
||||
|
||||
Reference in New Issue
Block a user