You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by Guo-Heng <gi...@git.apache.org> on 2018/11/24 08:08:54 UTC

[GitHub] trafodion pull request #1749: [TRAFODION-3236] allocate revcive buffer by us...

GitHub user Guo-Heng opened a pull request:

    https://github.com/apache/trafodion/pull/1749

    [TRAFODION-3236] allocate revcive buffer by using dynamic array sizing instead of allocate from heap dynamically

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Guo-Heng/trafodion trafodion_issue_3236

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafodion/pull/1749.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1749
    
----
commit 79ac56f5c4bd6400c04cd26e4698557579c4fcac
Author: heng.guo <he...@...>
Date:   2018-11-24T07:20:35Z

    allocate revcive buffer by using dynamic array sizing instead of allocate from heap dynamically

----


---

[GitHub] trafodion pull request #1749: [TRAFODION-3236] allocate revcive buffer by us...

Posted by Guo-Heng <gi...@git.apache.org>.
Github user Guo-Heng closed the pull request at:

    https://github.com/apache/trafodion/pull/1749


---

[GitHub] trafodion pull request #1749: [TRAFODION-3236] allocate revcive buffer by us...

Posted by prashanth-vasudev <gi...@git.apache.org>.
Github user prashanth-vasudev commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1749#discussion_r236393855
  
    --- Diff: core/sqf/src/tm/tm.cpp ---
    @@ -2789,8 +2789,7 @@ void tm_process_msg(BMS_SRE *pp_sre)
     {
         short                  lv_ret;
         char                   la_send_buffer[4096];
    -    char                   la_recv_buffer[sizeof(Tm_Req_Msg_Type)];
    -    char                  *la_recv_buffer_ddl = NULL;
    +    char                   la_recv_buffer[pp_sre->sre_reqDataSize];
    --- End diff --
    
    Would be good to check the size for non zero value. If the caller passes zero, process will crash at a later point.


---