commit | 96dd18c4ee84ce29c3fbffbdc53fdf1a56341c44 | [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 | fbeb9829bbc6f8a14eb4eb047fe10dcf6677b709 | |
parent | 61db3478dc16bd4950f0cad8fe7bbc4bf983217f [diff] [blame] |
Fix off-by-one error in Regex::isValid llvm-svn: 187992
diff --git a/llvm/lib/Support/Regex.cpp b/llvm/lib/Support/Regex.cpp index dec967e..5413641 100644 --- a/llvm/lib/Support/Regex.cpp +++ b/llvm/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; }