summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/RegularExpression.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-05-23 20:27:15 +0000
committerGreg Clayton <gclayton@apple.com>2013-05-23 20:27:15 +0000
commitcc24775b42aa6ef8fc82f0cb1ace7e1cc26cc561 (patch)
tree2c7397e2a03facdea09506fc7dcbc47c537c2453 /lldb/source/Core/RegularExpression.cpp
parentf18cff4767da02a0566007d94c2dbd28a8b93c07 (diff)
downloadbcm5719-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.cpp2
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)
{
OpenPOWER on IntegriCloud