We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The copy of data are using invalid length
(value.size() + 1) * sizeof(otext)
The vector is ending at value.size(), not value.size()+1, ocilib_impl.hpp:4179
Why is the length multiplied with sizeof(otext) ? The definition of Raw is
typedef std::vector<unsigned char> Raw;
and otext is either
typedef char otext;
or
typedef wchar_t otext;
which leads to invalid length when compiling with OCI_CHAR_WIDE (2 times bigger size than allowed + 2 extra bytes).
The line 4179 must be
memcpy(_data + (_elemSize * index), &value[0], value.size() );
template<> inline void BindArray::BindArrayObject<Raw, unsigned char>::SetInData() { if (_mode & OCI_BDM_IN) { std::vector<Raw>::iterator it, it_end; unsigned int index = 0; unsigned int currElemCount = Check(OCI_BindArrayGetSize(_pStatement)); for (it = _vector.begin(), it_end = _vector.end(); it != it_end && index < _elemCount && index < currElemCount; ++it, ++index) { Raw & value = *it; if (value.size() > 0) { ===> memcpy(_data + (_elemSize * index), &value[0], (value.size() + 1) * sizeof(otext)); } } } }
The text was updated successfully, but these errors were encountered:
Hi,
Thanks again for reporting issues :)
This was due to a faulty copy and paste action coupled to a missed test in OCI_CHARSET_WIDE builds
Fix committed.
Regards,
Vincent
Sorry, something went wrong.
vrogier
No branches or pull requests
The copy of data are using invalid length
The vector is ending at value.size(), not value.size()+1, ocilib_impl.hpp:4179
Why is the length multiplied with sizeof(otext) ?
The definition of Raw is
and otext is either
or
which leads to invalid length when compiling with OCI_CHAR_WIDE (2 times bigger size than allowed + 2 extra bytes).
The line 4179 must be
The text was updated successfully, but these errors were encountered: