Kaydet (Commit) ed01dc1a authored tarafından Tamas Bunth's avatar Tamas Bunth Kaydeden (comit) Tamás Bunth

mysqlc: ensure cursor is not out of range

when calling getXXX() methods of a simple result set.

Change-Id: I9e018385bb73468ea520b03275232c0982cbcba0
Reviewed-on: https://gerrit.libreoffice.org/60095
Tested-by: Jenkins
Reviewed-by: 's avatarTamás Bunth <btomi96@gmail.com>
üst b38065ea
......@@ -71,8 +71,10 @@ class OResultSet final : public OBase_Mutex,
MYSQL_RES* m_pResult;
unsigned int fieldCount;
rtl_TextEncoding m_encoding;
sal_Int32 m_nCurrentField = 0;
bool m_bWasNull = false; // did the last getXXX result null?
sal_Int32 m_nRowPosition = 0;
sal_Int32 m_nRowCount = 0;
// OPropertyArrayUsageHelper
::cppu::IPropertyArrayHelper* createArrayHelper() const SAL_OVERRIDE;
// OPropertySetHelper
......@@ -232,9 +234,8 @@ public:
css::uno::Sequence<sal_Int32>
SAL_CALL deleteRows(const css::uno::Sequence<Any>& rows) SAL_OVERRIDE;
/// @throws SQLException
/// @throws RuntimeException
void checkColumnIndex(sal_Int32 index);
void checkRowIndex();
private:
using ::cppu::OPropertySetHelper::getFastPropertyValue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment