From 6d0d4687bb6b81cb40cb05f4361dfe813888ff2d Mon Sep 17 00:00:00 2001 From: Duyoung Jang Date: Fri, 12 Apr 2013 14:07:15 +0900 Subject: [PATCH] Fix prevent issue Change-Id: I456a6c6826ed542c7d60146a6ebd66f126a66dce Signed-off-by: Duyoung Jang --- inc/InstallerDefs.h | 2 +- src/Util/InstallerUtil.cpp | 3 ++- src/backend/backend.cpp | 11 +++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/inc/InstallerDefs.h b/inc/InstallerDefs.h index b22ec6e..dd82ea7 100755 --- a/inc/InstallerDefs.h +++ b/inc/InstallerDefs.h @@ -23,7 +23,7 @@ #include "InstallerUtil.h" -#define OSP_INSTALLER_VERSION "version=[20130411.1]" +#define OSP_INSTALLER_VERSION "version=[20130412.1]" #define DIR_BIN L"/bin" #define DIR_INFO L"/info" diff --git a/src/Util/InstallerUtil.cpp b/src/Util/InstallerUtil.cpp index b47e175..7b6ec33 100755 --- a/src/Util/InstallerUtil.cpp +++ b/src/Util/InstallerUtil.cpp @@ -837,7 +837,8 @@ InstallerUtil::GetFileDigest(const String& filePath, String& digestValue) if (readBytes > 0) { ByteBuffer buffer; - buffer.Construct((const byte*)pBuf.get(), 0, readBytes, bufSize); + r = buffer.Construct((const byte*)pBuf.get(), 0, readBytes, bufSize); + TryReturn(!IsFailed(r), false, "buffer.Construct() is failed."); r = pHash->Update(buffer); TryReturn(!IsFailed(r), false, "pHash->Update() is failed."); diff --git a/src/backend/backend.cpp b/src/backend/backend.cpp index 176f76f..dc9bb96 100755 --- a/src/backend/backend.cpp +++ b/src/backend/backend.cpp @@ -62,11 +62,14 @@ main(int argc, char **argv) for (int i = 0; i < argc; i++) { const char* pStr = argv[i]; - String cmd(pStr); - buf.Append(cmd); - if (i != argc - 1) + if (pStr) { - buf.Append(" "); + String cmd(pStr); + buf.Append(cmd); + if (i != argc - 1) + { + buf.Append(" "); + } } } -- 2.7.4