Skip to content

Commit 0777226

Browse files
authored
Merge pull request rdkcentral#6266 from viveksinghnarwaria/RDKCOM-5266_1
webkitbrowser-plugin fix for SonarQube issue CWE-197: Numeric Truncation Error
2 parents 90c9c70 + 3aa4e5c commit 0777226

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

WebKitBrowser/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ All notable changes to this RDK Service will be documented in this file.
1717
* For more details, refer to [versioning](https://github.com/rdkcentral/rdkservices#versioning) section under Main README.
1818

1919

20-
## [1.1.28] - 2025-04-06
20+
## [1.1.29] - 2025-06-05
21+
### Fixed
22+
- Fixed Numeric Truncation Error
23+
24+
## [1.1.28] - 2025-06-04
2125
### Fixed
2226
- virtual function was overridden incorrectly
2327

WebKitBrowser/WebKitBrowser.cpp

Lines changed: 2 additions & 2 deletions
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 28
24+
#define API_VERSION_NUMBER_PATCH 29
2525

2626
namespace WPEFramework {
2727

@@ -210,7 +210,7 @@ namespace Plugin {
210210

211211
Core::ProxyType<Web::Response> result(PluginHost::IFactories::Instance().Response());
212212
Core::TextSegmentIterator index(
213-
Core::TextFragment(request.Path, _skipURL, request.Path.length() - _skipURL), false, '/');
213+
Core::TextFragment(request.Path, static_cast<uint32_t>(_skipURL), static_cast<uint32_t>(request.Path.length() - _skipURL)), false, '/');
214214

215215
result->ErrorCode = Web::STATUS_BAD_REQUEST;
216216
result->Message = "Unknown error";

WebKitBrowser/WebKitBrowser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ namespace Plugin {
274274
void event_statechange(const bool& suspended); // StateControl
275275

276276
private:
277-
uint8_t _skipURL;
277+
size_t _skipURL;
278278
uint32_t _connectionId;
279279
PluginHost::IShell* _service;
280280
Exchange::IWebBrowser* _browser;

0 commit comments

Comments
 (0)