Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential bug CWE-197 Numeric Truncation Error found during static co… #5906

Open
wants to merge 1 commit into
base: sprint/24Q4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WebKitBrowser/WebKitBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ namespace Plugin {

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

result->ErrorCode = Web::STATUS_BAD_REQUEST;
result->Message = "Unknown error";
Expand Down
2 changes: 1 addition & 1 deletion WebKitBrowser/WebKitBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ namespace Plugin {
void event_statechange(const bool& suspended); // StateControl

private:
uint8_t _skipURL;
size_t _skipURL;
uint32_t _connectionId;
PluginHost::IShell* _service;
Exchange::IWebBrowser* _browser;
Expand Down