commit | 783a0387c5eef62ff50950aa3e977b2652a3c3a5 | [log] [tgz] |
---|---|---|
author | Alexey Samsonov <samsonov@google.com> | Thu Aug 08 17:32:45 2013 +0000 |
committer | Alexey Samsonov <samsonov@google.com> | Thu Aug 08 17:32:45 2013 +0000 |
tree | 4aba83eec46eeced2a36f5ddc8db20983918277b | |
parent | 014773626d2678868adf696ac58c44d2b2980fa8 [diff] [blame] |
Fix off-by-one error in Regex::isValid git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187992 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Support/Regex.cpp b/lib/Support/Regex.cpp index dec967e..5413641 100644 --- a/lib/Support/Regex.cpp +++ b/lib/Support/Regex.cpp
@@ -43,7 +43,7 @@ size_t len = llvm_regerror(error, preg, NULL, 0); - Error.resize(len); + Error.resize(len - 1); llvm_regerror(error, preg, &Error[0], len); return false; }