From: jiangyuwei Date: Mon, 13 May 2024 08:22:37 +0000 (+0800) Subject: [M120 Migration] Fixes svace issues X-Git-Tag: submit/tizen/20240513.160016^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=507e6bbb1723418f742de4681631311b9118fba5;p=platform%2Fframework%2Fweb%2Fchromium-efl.git [M120 Migration] Fixes svace issues This patch fixes the following issues: Return value of a function 'evas_device_name_get' is dereferenced at efl_event_handler.cc:983 without checking for NULL. Add null check for the device_name. References: - https://review.tizen.org/gerrit/302969/ Change-Id: I3df82fec4d639e5a5e3b61355f3b1b48feef905c Signed-off-by: jiangyuwei --- diff --git a/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.cc b/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.cc index dfeb120d6eeb..f94751a4219f 100644 --- a/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.cc +++ b/tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.cc @@ -982,7 +982,8 @@ void EflEventHandler::ConvertUpToReturnBackIfNeeded(EVT* evt, bool is_press) { // No need hide IME panel when press the IME panel's up key. Evas_Device_Class device_id = evas_device_class_get(evt->dev); const char* device_name = evas_device_name_get(evt->dev); - if (device_id != EVAS_DEVICE_CLASS_KEYBOARD || !strcmp(device_name, "ime")) + if (device_id != EVAS_DEVICE_CLASS_KEYBOARD || + (device_name != nullptr && !strcmp(device_name, "ime"))) return; if (is_press) {