From 2e41b0e6e7573f9a56b7d45ebaba9e3239a9da33 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 9 Dec 2008 19:10:54 +0000 Subject: Fix a serious null termination bug found by David Chisnall! llvm-svn: 60778 --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 80ef53f5f9c5..c8fa99491657 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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 -- cgit v1.2.3