mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: potential std::stoi crash in Windows Toasts (#49953)
fix: potential std::stoi crash in Windows Toasts Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -371,7 +371,7 @@ void HandleToastActivation(const std::wstring& invoked_args,
|
||||
|
||||
int action_index = -1;
|
||||
if (!action_index_str.empty()) {
|
||||
action_index = std::stoi(action_index_str);
|
||||
base::StringToInt(base::WideToUTF8(action_index_str), &action_index);
|
||||
}
|
||||
|
||||
std::string reply_text;
|
||||
|
||||
Reference in New Issue
Block a user