Skip to content

Commit

Permalink
Fixed 'off the end' bug in crashes table (#2285)
Browse files Browse the repository at this point in the history
  • Loading branch information
PoppySeedPlehzr committed Jul 23, 2016
1 parent 2fb3797 commit 10719e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion osquery/tables/system/darwin/crashes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ void readCrashDump(const std::string& app_log, Row& r) {

// Grab the most recent stack trace line of the crashed thread.
if (crashed_thread_seen && toks[0] == crashed_thread_format.str()) {
r["stack_trace"] = *(++it);
if (std::next(it) != lines.end()) {
r["stack_trace"] = *(++it);
}
crashed_thread_seen = false;
continue;
}
Expand Down

0 comments on commit 10719e5

Please sign in to comment.