From: Junkyeong Kim Date: Mon, 8 Feb 2021 09:45:46 +0000 (+0900) Subject: fix memcpy pointer error X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb7f14288730e798b8c064744e4b273d74309a5a;p=platform%2Fcore%2Fuifw%2Flibtdm.git fix memcpy pointer error Change-Id: I1beeb94bf6810195198daf90552176dda37a6618 Signed-off-by: Junkyeong Kim --- diff --git a/src/tdm_hwc.c b/src/tdm_hwc.c index a445fe2..11a7d5d 100644 --- a/src/tdm_hwc.c +++ b/src/tdm_hwc.c @@ -1050,7 +1050,7 @@ tdm_hwc_get_property(tdm_hwc *hwc, uint32_t id, tdm_value *value) hal_tdm_value hvalue; ret = (tdm_error)hal_tdm_hwc_get_property((hal_tdm_hwc *)private_hwc->hwc_backend, id, &hvalue); if (ret == TDM_ERROR_NONE) - memcpy(value->ptr, &hvalue.ptr, sizeof(tdm_value)); + memcpy(&value->ptr, &hvalue.ptr, sizeof(tdm_value)); } else { if (!func_hwc->hwc_get_property) { /* LCOV_EXCL_START */ diff --git a/src/tdm_hwc_window.c b/src/tdm_hwc_window.c index 157cefa..074131d 100644 --- a/src/tdm_hwc_window.c +++ b/src/tdm_hwc_window.c @@ -468,7 +468,8 @@ tdm_hwc_window_get_property(tdm_hwc_window *hwc_window, unsigned int id, tdm_val if (private_module->use_hal_tdm) { hal_tdm_value hvalue; ret = hal_tdm_hwc_window_get_property((hal_tdm_hwc_window *)private_hwc_window->hwc_window_backend, id, &hvalue); - memcpy(value->ptr, &hvalue.ptr, sizeof(tdm_value)); + if (ret == TDM_ERROR_NONE) + memcpy(&value->ptr, &hvalue.ptr, sizeof(tdm_value)); } else { if (!func_hwc_window->hwc_window_get_property) { /* LCOV_EXCL_START */ diff --git a/src/tdm_output.c b/src/tdm_output.c index 3e1ef1c..9232de9 100644 --- a/src/tdm_output.c +++ b/src/tdm_output.c @@ -951,7 +951,7 @@ tdm_output_get_property(tdm_output *output, unsigned int id, tdm_value *value) hal_tdm_value hvalue; ret = (tdm_error)hal_tdm_output_get_property(private_output->output_backend, id, &hvalue); if (ret == TDM_ERROR_NONE) - memcpy(value->ptr, &hvalue.ptr, sizeof(tdm_value)); + memcpy(&value->ptr, &hvalue.ptr, sizeof(tdm_value)); } else { func_output = &private_module->func_output;