summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
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
commit2e41b0e6e7573f9a56b7d45ebaba9e3239a9da33 (patch)
tree877db11380c9d3077fb75b734b14e85186876a47 /clang/lib/CodeGen/CodeGenModule.cpp
parent058522f1da60c36522c47ac6ac0657796310ca11 (diff)
downloadbcm5719-llvm-2e41b0e6e7573f9a56b7d45ebaba9e3239a9da33.tar.gz
bcm5719-llvm-2e41b0e6e7573f9a56b7d45ebaba9e3239a9da33.zip
Fix a serious null termination bug found by David Chisnall!
llvm-svn: 60778
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 80ef53f5f9c..c8fa9949165 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
OpenPOWER on IntegriCloud