[cfe-commits] r60778 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Chris Lattner
sabre at nondot.org
Tue Dec 9 11:10:59 PST 2008
Author: lattner
Date: Tue Dec 9 13:10:54 2008
New Revision: 60778
URL: http://llvm.org/viewvc/llvm-project?rev=60778&view=rev
Log:
Fix a serious null termination bug found by David Chisnall!
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=60778&r1=60777&r2=60778&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Dec 9 13:10:54 2008
@@ -959,7 +959,7 @@
/// character. The result has pointer to array type.
llvm::Constant *CodeGenModule::GetAddrOfConstantCString(const std::string &str,
const char *GlobalName){
- return GetAddrOfConstantString(str + "\0", GlobalName);
+ return GetAddrOfConstantString(str + '\0', GlobalName);
}
/// EmitObjCPropertyImplementations - Emit information for synthesized
More information about the cfe-commits
mailing list