summaryrefslogtreecommitdiff
path: root/tools/llvm-rc
diff options
context:
space:
mode:
authorMarek Sokolowski <mnbvmar@gmail.com>2017-08-29 20:03:18 +0000
committerMarek Sokolowski <mnbvmar@gmail.com>2017-08-29 20:03:18 +0000
commit505883f042c0fbf9340dc1373c75bcde464d1f39 (patch)
tree5feda6b70e6e739deeaa29927cc57bf4565726b7 /tools/llvm-rc
parentdb2668663f18d60ffd7eb41389e64983cf74436a (diff)
[llvm-rc] Fix DIALOG(EX) parsing ability (parser, pt 5/8).
This fixes a use-after-free bug that was noticed by a sanitizer buildbot (http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/7502). Differential Revision: https://reviews.llvm.org/D37271 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-rc')
-rw-r--r--tools/llvm-rc/ResourceScriptParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-rc/ResourceScriptParser.cpp b/tools/llvm-rc/ResourceScriptParser.cpp
index 499d0af83ad..41b11911b06 100644
--- a/tools/llvm-rc/ResourceScriptParser.cpp
+++ b/tools/llvm-rc/ResourceScriptParser.cpp
@@ -329,7 +329,7 @@ Expected<Control> RCParser::parseControl() {
// [class] id, x, y, width, height [, style] [, exstyle] [, helpID]
// Note that control ids must be integers.
ASSIGN_OR_RETURN(ClassResult, readIdentifier());
- StringRef ClassUpper = ClassResult->upper();
+ std::string ClassUpper = ClassResult->upper();
if (Control::SupportedCtls.find(ClassUpper) == Control::SupportedCtls.end())
return getExpectedError("control type, END or '}'", true);