In Direct Path documentation & ora9i example cdemodp.c, we're told to retrieve the number of rows (OCI_ATTR_NUM_ROWS) in the column array we allocate (OCI_HTYPE_DIRPATH_COLUMN_ARRAY). Then we use a lastoff variable to set entries in the column array. Fine. However, in cdemodp.c at line 1051 I find the following:
My question is: What if the array bounds check fails? That is, what if last offset is greater than number of rows initially allocated? How should that be handled? Or, is there some way to ensure that I get enough rows in the first place?