Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

memory allocation of OCIBindDynamic callback

ys123May 17 2015 — edited May 17 2015

Hi dear all,

Is it safe to allocate buffer from stack in the callback like this ?

static sb4 CBIN(

  void *ictxp,

  OCIBind *bindp,

  ub4 iter,

  ub4 index,

  void **bufpp,

  ub4 *alenp,

  ub1 *piecep,

  void **indp)

{

  char buf[100];

  sprintf(buf,"TEST %d %d",iter,index);

  *bufpp = buf;

  ...

  return OCI_CONTINUE;

}

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 14 2015
Added on May 17 2015
0 comments
407 views