You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by su...@apache.org on 2016/07/05 13:28:50 UTC
[3/5] incubator-trafodion git commit: fix potential string overflow
issue
fix potential string overflow issue
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/bfff5350
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/bfff5350
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/bfff5350
Branch: refs/heads/master
Commit: bfff53505dd810a260a7fafb50b5dd716e5c8fbe
Parents: c234376
Author: Liu Ming <ov...@sina.com>
Authored: Fri Jul 1 00:28:47 2016 +0000
Committer: Liu Ming <ov...@sina.com>
Committed: Fri Jul 1 00:28:47 2016 +0000
----------------------------------------------------------------------
core/sql/exp/ExpError.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/bfff5350/core/sql/exp/ExpError.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpError.cpp b/core/sql/exp/ExpError.cpp
index fbfb55b..8a79d91 100644
--- a/core/sql/exp/ExpError.cpp
+++ b/core/sql/exp/ExpError.cpp
@@ -628,7 +628,7 @@ char *stringToHex(char * out, Int32 outLen, char * in, Int32 inLen)
//clear out buffer first
memset(out,0,outLen);
- outLen = (outLen / 2) ;
+ outLen = (outLen / 2) -1 ;
if(inLen < outLen) outLen = inLen;