diff options
author | Pavel Labath <labath@google.com> | 2016-11-28 11:47:14 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-11-28 11:47:14 +0000 |
commit | 4fd575423483378560db55ee291576d77b57c7a0 (patch) | |
tree | d3bcd4abede543e8c645389e7cf2649433d1833a | |
parent | 57ae857548bdf8928171aebb9508cb0d9e04ccfe (diff) | |
download | bcm5719-llvm-4fd575423483378560db55ee291576d77b57c7a0.tar.gz bcm5719-llvm-4fd575423483378560db55ee291576d77b57c7a0.zip |
Fix a crash in ProcessPOSIXLog
We are getting a null pointer for the list of categories here (presumably due to
the args refactor).
llvm-svn: 288026
-rw-r--r-- | lldb/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp b/lldb/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp index 7f07bd568a2..9ced11c7ca2 100644 --- a/lldb/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp +++ b/lldb/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp @@ -95,7 +95,7 @@ void ProcessPOSIXLog::DisableLog(const char **args, Stream *feedback_strm) { uint32_t flag_bits = 0; flag_bits = log->GetMask().Get(); - for (; args[0]; args++) { + for (; args && args[0]; args++) { const char *arg = args[0]; uint32_t bits = GetFlagBits(arg); @@ -134,7 +134,7 @@ Log *ProcessPOSIXLog::EnableLog(StreamSP &log_stream_sp, uint32_t log_options, if (g_log) { bool got_unknown_category = false; - for (; args[0]; args++) { + for (; args && args[0]; args++) { const char *arg = args[0]; uint32_t bits = GetFlagBits(arg); |