diff options
author | Marek Sokolowski <mnbvmar@gmail.com> | 2017-08-29 20:03:18 +0000 |
---|---|---|
committer | Marek Sokolowski <mnbvmar@gmail.com> | 2017-08-29 20:03:18 +0000 |
commit | 75fa173e202c5418cc5f050a932e46b604afdb8e (patch) | |
tree | 910c8a45916f141406726ca1f96c68b6ce8691b7 /llvm/tools/llvm-rc/ResourceScriptParser.cpp | |
parent | d61fca35ca043fd1553e0bbcc56540ed3602ee1e (diff) | |
download | bcm5719-llvm-75fa173e202c5418cc5f050a932e46b604afdb8e.tar.gz bcm5719-llvm-75fa173e202c5418cc5f050a932e46b604afdb8e.zip |
[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
llvm-svn: 312028
Diffstat (limited to 'llvm/tools/llvm-rc/ResourceScriptParser.cpp')
-rw-r--r-- | llvm/tools/llvm-rc/ResourceScriptParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-rc/ResourceScriptParser.cpp b/llvm/tools/llvm-rc/ResourceScriptParser.cpp index 499d0af83ad..41b11911b06 100644 --- a/llvm/tools/llvm-rc/ResourceScriptParser.cpp +++ b/llvm/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); |