[lld] r209323 - [PECOFF] Fix unsafe memory access.
Rui Ueyama
ruiu at google.com
Wed May 21 14:51:11 PDT 2014
Author: ruiu
Date: Wed May 21 16:51:11 2014
New Revision: 209323
URL: http://llvm.org/viewvc/llvm-project?rev=209323&view=rev
Log:
[PECOFF] Fix unsafe memory access.
Modified:
lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h
Modified: lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h?rev=209323&r1=209322&r2=209323&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h Wed May 21 16:51:11 2014
@@ -94,14 +94,16 @@ private:
class SymbolRenameFile : public SimpleFile {
public:
SymbolRenameFile(StringRef from, StringRef to)
- : SimpleFile("<symbol-rename>"), _to(*this, to),
- _from(*this, from, &_to) {
+ : SimpleFile("<symbol-rename>"), _fromSym(from), _toSym(to),
+ _from(*this, _fromSym, &_to), _to(*this, _toSym) {
addAtom(_from);
};
private:
- COFFUndefinedAtom _to;
+ std::string _fromSym;
+ std::string _toSym;
COFFUndefinedAtom _from;
+ COFFUndefinedAtom _to;
};
} // namespace impl
More information about the llvm-commits
mailing list