hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shivzone <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-644. Account for '\0' when dispa...
Date Thu, 14 Apr 2016 22:54:48 GMT
Github user shivzone commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/604#discussion_r59805511
  
    --- Diff: src/backend/cdb/cdbquerycontextdispatching.c ---
    @@ -779,21 +779,24 @@ static void
     RebuildNamespace(QueryContextInfo *cxt)
     {
     
    +	MemoryContext oldContext;
     	int len;
     	char buffer[4], *binary;
    +	oldContext = MemoryContextSwitchTo(MessageContext);
     	ReadData(cxt, buffer, sizeof(buffer), TRUE);
     
     	len = (int) ntohl(*(uint32 *) buffer);
     	binary = palloc(len);
     	if(ReadData(cxt, binary, len, TRUE))
     	{
    -		StringInfoData buffer;
    -		initStringInfoOfString(&buffer, binary, len);
    -		dfs_address = strdup(buffer.data);
    +		dfs_address = pstrdup(binary);
    --- End diff --
    
    identation needs to be 4 spaces


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message