Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/248#discussion_r48912122
  
    --- Diff: core/sql/executor/ExExeUtilCli.cpp ---
    @@ -1048,6 +1052,77 @@ Lng32 ExeCliInterface::executeImmediateExec(const 
char * stmtStr,
       return ((cliRetcode != -1) ? cliRetcode : retcode);
     }
     
    +
    +Lng32 ExeCliInterface::executeImmediateExecNoDealloc(const char * stmtStr,
    +                                      char * outputBuf,
    +                                      Lng32 * outputBufLen,
    +                                      NABoolean nullTerminate,
    +                                      Int64 * rowsAffected 
    +                                      )
    +{
    +  Lng32 retcode = 0;
    +
    +  retcode = exec();
    +  if (retcode < 0)
    +    {
    +      deallocStuff(module_, stmt_, sql_src_, input_desc_, output_desc_);
    +      return retcode;
    +    }
    +
    +  retcode = fetch();
    +  if (retcode < 0)
    +    {
    +      deallocStuff(module_, stmt_, sql_src_, input_desc_, output_desc_);
    +      return retcode;
    +    }
    +
    +  if ((outputBuf) &&
    +      (outputBufLen))
    +    {
    +      *outputBufLen = 0;
    +      if (retcode != 100)
    +   {
    +     char * ptr;
    +     Lng32 len;
    +     getPtrAndLen(1, ptr, len);
    +
    +     str_cpy_all(outputBuf, ptr, len);
    --- End diff --
    
    Is there any buffer overrun checking done anywhere?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to