aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-12-09 19:10:54 +0000
committerChris Lattner <sabre@nondot.org>2008-12-09 19:10:54 +0000
commitc9f29c61856ffb5f643cedbe87ac076f21a1381a (patch)
treea7810379918863ee7445036df12530dc59485e89 /lib/CodeGen
parent8b9ad38dab1b44b71ccbcb8f03fbf4339eb3110a (diff)
Fix a serious null termination bug found by David Chisnall!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 80ef53f5f9..c8fa994916 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -959,7 +959,7 @@ llvm::Constant *CodeGenModule::GetAddrOfConstantString(const std::string &str,
/// 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