Github user paul-guo- commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1243#discussion_r117419625
  
    --- Diff: src/backend/executor/nodeShareInputScan.c ---
    @@ -552,11 +551,61 @@ static void sisc_lockname(char* p, int size, int 
share_id, const char* name)
        }
     }
     
    +
    +char * joint_tmp_file_name(ShareInput_Lk_Context *lk_ctxt, char *name)
    +{
    +   char *tmp_file = palloc(sizeof(char) * MAXPGPATH);
    +
    +   strcat(tmp_file, getCurrentTempFilePath);
    +   strcat(tmp_file, "/");
    +   strcat(tmp_file, PG_TEMP_FILES_DIR);
    +   strcat(tmp_file, "/");
    --- End diff --
    
    Please either calculate the size of tmp_file before calling strcat(),  or 
call strncat().
    For all strcat() cases, please also modify.
    
    Besides, You do not have the below strings as one parameter: "/" 
PG_TEMP_FILES_DIR "/"


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to