Skip to content

Incorrect logic / crash in commands.cc #182

@atuchin-m

Description

@atuchin-m

The problem: args_.erase(it); is used instead of it = args_.erase(it);: https://github.com/brave/omaha/blob/1.3.361.113/omaha/base/commands.cc#L565

  • erase() is called, there force it is possible invalidated.
  • the next comparing of it with args_.end() is undefined behavior (a possible crash)
  • it likely fails to erase the next element (how it was designed)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions