[llvm] r312028 - [llvm-rc] Fix DIALOG(EX) parsing ability (parser, pt 5/8).
Marek Sokolowski via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 29 13:03:18 PDT 2017
Author: mnbvmar
Date: Tue Aug 29 13:03:18 2017
New Revision: 312028
URL: http://llvm.org/viewvc/llvm-project?rev=312028&view=rev
Log:
[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
Modified:
llvm/trunk/tools/llvm-rc/ResourceScriptParser.cpp
Modified: llvm/trunk/tools/llvm-rc/ResourceScriptParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-rc/ResourceScriptParser.cpp?rev=312028&r1=312027&r2=312028&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-rc/ResourceScriptParser.cpp (original)
+++ llvm/trunk/tools/llvm-rc/ResourceScriptParser.cpp Tue Aug 29 13:03:18 2017
@@ -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);
More information about the llvm-commits
mailing list