You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by yj...@apache.org on 2015/12/18 07:53:40 UTC

incubator-hawq git commit: HAWQ-262. Wrong string buffer size in snprintf in function callSyncRPCRemote()

Repository: incubator-hawq
Updated Branches:
  refs/heads/master 52f2822fc -> 2576e6872


HAWQ-262. Wrong string buffer size in snprintf in function callSyncRPCRemote()


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/2576e687
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/2576e687
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/2576e687

Branch: refs/heads/master
Commit: 2576e687253fa861f9c7514ef0b7e8b8d4867574
Parents: 52f2822
Author: YI JIN <yj...@pivotal.io>
Authored: Fri Dec 18 17:53:20 2015 +1100
Committer: YI JIN <yj...@pivotal.io>
Committed: Fri Dec 18 17:53:20 2015 +1100

----------------------------------------------------------------------
 src/backend/resourcemanager/communication/rmcomm_SyncComm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2576e687/src/backend/resourcemanager/communication/rmcomm_SyncComm.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/communication/rmcomm_SyncComm.c b/src/backend/resourcemanager/communication/rmcomm_SyncComm.c
index e3f87b6..ba5e9c8 100644
--- a/src/backend/resourcemanager/communication/rmcomm_SyncComm.c
+++ b/src/backend/resourcemanager/communication/rmcomm_SyncComm.c
@@ -170,7 +170,7 @@ int callSyncRPCRemote(const char     	   *hostname,
 	res = connectToServerRemote(hostname, port, &fd);
 	if ( res != FUNC_RETURN_OK )
 	{
-		snprintf(errorbuf, sizeof(errorbuf),
+		snprintf(errorbuf, errorbufsize,
 				 "failed to connect to remote socket server %s:%d",
 				 hostname,
 				 port);
@@ -191,7 +191,7 @@ int callSyncRPCRemote(const char     	   *hostname,
 	{
 		rm_pfree(AsyncCommContext, context);
 
-		snprintf(errorbuf, sizeof(errorbuf),
+		snprintf(errorbuf, errorbufsize,
 				 "failed to register socket connection fd %d connected to %s:%d "
 				 "for resource rpc communication",
 				 fd,