[lld] r186771 - [PECOFF] Fix use-after-free.

Rui Ueyama ruiu at google.com
Sat Jul 20 14:00:47 PDT 2013


Author: ruiu
Date: Sat Jul 20 16:00:47 2013
New Revision: 186771

URL: http://llvm.org/viewvc/llvm-project?rev=186771&view=rev
Log:
[PECOFF] Fix use-after-free.

Modified:
    lld/trunk/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp

Modified: lld/trunk/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp?rev=186771&r1=186770&r2=186771&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp Sat Jul 20 16:00:47 2013
@@ -57,7 +57,7 @@ bool PECOFFTargetInfo::validateImpl(raw_
 /// Append the given file to the input file list. The file must be an object
 /// file or an import library file.
 bool PECOFFTargetInfo::appendInputFileOrLibrary(std::string path) {
-  StringRef ext = llvm::sys::path::extension(path).lower();
+  std::string ext = llvm::sys::path::extension(path).lower();
   // This is an import library file. Look for the library file in the search
   // paths, unless the path contains a directory name.
   if (ext == ".lib") {





More information about the llvm-commits mailing list