Fix uninitialized variable use in SelectionControllerEfl
authorGrzegorz Ludwikowski <g.ludwikowsk@samsung.com>
Mon, 23 Nov 2015 13:34:08 +0000 (14:34 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
commitbe47dc868cc26cf0fa2c3ff73e30742b0c793680
tree897c9c5ddb4b481d16171f4a17ffffa1970b8551
parent0e0b8b208bc5a0c34c6d6a7de4ee557ecc2d7074
Fix uninitialized variable use in SelectionControllerEfl

In file chromium_impl/content/browser/selection/selection_controller_efl.cc
in member function SelectionControllerEfl::ShowContextMenu() variables
blinkX and blinkY are intialized conditionally depending on the result
of web_contents_.GetRenderWidgetHostView(). Later the variables are used
anyway, even if uninitialized. This causes garbage values to be passed
to WebContentsViewEfl::ShowContextMenu member function with no
indication of failure.

Fixed by conditionally calling WebContentsViewEfl::ShowContextMenu
only if web_contents_.GetRenderWidgetHostView() succeeds.

This error was reported by cppcheck static analysis tool.

Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=15001

Reviewed by: a1.gomes, d.waslicki, sns.park

Change-Id: I36ca59bf56d5c9737a03b92a662c8b074797f7f9
Signed-off-by: Grzegorz Ludwikowski <g.ludwikowsk@samsung.com>
tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc