diff options
author | Greg Clayton <gclayton@apple.com> | 2013-05-23 20:27:15 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-05-23 20:27:15 +0000 |
commit | cc24775b42aa6ef8fc82f0cb1ace7e1cc26cc561 (patch) | |
tree | 2c7397e2a03facdea09506fc7dcbc47c537c2453 /lldb/source/Core/RegularExpression.cpp | |
parent | f18cff4767da02a0566007d94c2dbd28a8b93c07 (diff) | |
download | bcm5719-llvm-cc24775b42aa6ef8fc82f0cb1ace7e1cc26cc561.tar.gz bcm5719-llvm-cc24775b42aa6ef8fc82f0cb1ace7e1cc26cc561.zip |
<rdar://problem/13966084>
Make sure to not call "regexec" from <regex.h> with a NULL C string, otherwise we can crash.
llvm-svn: 182607
Diffstat (limited to 'lldb/source/Core/RegularExpression.cpp')
-rw-r--r-- | lldb/source/Core/RegularExpression.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Core/RegularExpression.cpp b/lldb/source/Core/RegularExpression.cpp index 731974ad76b..4ccd7748b13 100644 --- a/lldb/source/Core/RegularExpression.cpp +++ b/lldb/source/Core/RegularExpression.cpp @@ -129,7 +129,7 @@ bool RegularExpression::Execute(const char* s, Match *match, int execute_flags) const { int err = 1; - if (m_comp_err == 0) + if (s != NULL && m_comp_err == 0) { if (match) { |