# Commit 803f9a6cdfeda64beee908576de0ad02d6b0c480 # Date 2013-09-12 17:47:08 +0100 # Author Tim Deegan # Committer Tim Deegan cpufreq: missing check of copy_from_guest() Coverity CID 1055131 Coverity CID 1055132 Signed-off-by: Tim Deegan Reviewed-by: Andrew Cooper Acked-by: Jan Beulich --- a/xen/drivers/cpufreq/cpufreq.c +++ b/xen/drivers/cpufreq/cpufreq.c @@ -471,8 +471,12 @@ int set_px_pminfo(uint32_t acpi_id, stru ret = -ENOMEM; goto out; } - copy_from_guest(pxpt->states, dom0_px_info->states, - dom0_px_info->state_count); + if ( copy_from_guest(pxpt->states, dom0_px_info->states, + dom0_px_info->state_count) ) + { + ret = -EFAULT; + goto out; + } pxpt->state_count = dom0_px_info->state_count; if ( cpufreq_verbose )