Hi, i found a bug in function: boolean OCI_API OCI_LobSeek
the problem is related to the control: if ((offset + lob->offset - 1) > size) that is valid only if mode = OCI_SEEK_CUR
I changed the function (see below), now it works properly.
boolean OCI_API OCI_LobSeek ( OCI_Lob *lob, big_uint offset, unsigned int mode ) { boolean res = TRUE; big_uint size = 0; OCI_CHECK_PTR(OCI_IPC_LOB, lob, FALSE); size = OCI_LobGetLength(lob); switch (mode) { case OCI_SEEK_CUR: if ((offset + lob->offset - 1) > size) res = FALSE; else lob->offset += offset; break; case OCI_SEEK_SET: if (offset > size) res = FALSE; else lob->offset = offset + 1; break; case OCI_SEEK_END: if (offset > size) res = FALSE; else lob->offset = size - offset + 1; break; default: res = FALSE; } OCI_RESULT(res); return res; }
Bug fixed in OCILIB trunck (v4.0.0)
Hi,
i found a bug in function:
boolean OCI_API OCI_LobSeek
the problem is related to the control:
if ((offset + lob->offset - 1) > size)
that is valid only if mode = OCI_SEEK_CUR
I changed the function (see below), now it works properly.
Bug fixed in OCILIB trunck (v4.0.0)