Skip to content

Commit c19769b

Browse files
Below warning is raised during Static Code Analysis (SCA) using PVS-Studio in webkitbrowser-plugin component at https://github.com/rdkcentral/rdkservices/blob/sprint/25Q1/WebKitBrowser/WebKitImplementation.cpp#L2717
struct ExitJob : public Core::IDispatch { virtual void Dispatch() { exit(1); } [CWE-670] V762: It is possible a virtual function was overridden incorrectly. See first argument of function 'Dispatch' in derived class 'ExitJob' and base class 'IDispatchType'. The warning is raised in https://github.com/rdkcentral/rdkservices/blob/sprint/25Q1/WebKitBrowser/WebKitImplementation.cpp#L2717 virtual void Dispatch() { exit(1); } This warning suggests a mismatch between the Dispatch() function signature in ExitJob and the virtual function it is intended to override. From Thunder Interface code(https://github.com/rdkcentral/Thunder/blob/R4/Source/core/IAction.h) I could see struct IDispatch is inherited from IDispatchType template. Here there are two templates IDispatchType which includes Dispatch virtual function - one with argument and other without any argument. Seems this issue arises because the Dispatch() method in ExitJob does not use the override keyword, making a chance of mismatch with the virtual function from the base class. By marking the Dispatch() method in ExitJob as an override of the virtual Dispatch() method in the base class I could see the warning is getting resolved. So wanted to address this warning with fix.
1 parent 7d3e9f0 commit c19769b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

WebKitBrowser/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ All notable changes to this RDK Service will be documented in this file.
1616

1717
* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.
1818

19+
20+
## [1.1.28] - 2025-04-06
21+
### Fixed
22+
- virtual function was overridden incorrectly
23+
1924
## [1.1.27] - 2024-12-18
2025
### Fixed
2126
- Testing: Fix encrypted playback in TC subview and improve visibility handling

WebKitBrowser/WebKitBrowser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#define API_VERSION_NUMBER_MAJOR 1
2323
#define API_VERSION_NUMBER_MINOR 1
24-
#define API_VERSION_NUMBER_PATCH 26
24+
#define API_VERSION_NUMBER_PATCH 28
2525

2626
namespace WPEFramework {
2727

0 commit comments

Comments
 (0)