From c9f29c61856ffb5f643cedbe87ac076f21a1381a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 9 Dec 2008 19:10:54 +0000 Subject: [PATCH] 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 --- lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.50.1