hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From y...@apache.org
Subject incubator-hawq git commit: HAWQ-262. Wrong string buffer size in snprintf in function callSyncRPCRemote()
Date Fri, 18 Dec 2015 06:53:40 GMT
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 <yjin@pivotal.io>
Authored: Fri Dec 18 17:53:20 2015 +1100
Committer: YI JIN <yjin@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,


Mime
View raw message