Kaydet (Commit) 1bbadad7 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

firebird-sdbc: check parameter index before setting in all cases

Change-Id: I291b0436a7cfde07879436a753329b52ff0c1049
Reviewed-on: https://gerrit.libreoffice.org/47284Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
üst d1296f4e
......@@ -348,6 +348,7 @@ void SAL_CALL OPreparedStatement::setNull(sal_Int32 nIndex, sal_Int32 /*nSqlType
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
ensurePrepared();
checkParameterIndex(nIndex);
setParameterNull(nIndex);
}
......@@ -584,6 +585,7 @@ void OPreparedStatement::setClob( sal_Int32 nParameterIndex, const OUString& rSt
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
checkParameterIndex(nParameterIndex);
#if SAL_TYPES_SIZEOFPOINTER == 8
isc_blob_handle aBlobHandle = 0;
......@@ -622,6 +624,7 @@ void SAL_CALL OPreparedStatement::setBlob(sal_Int32 nParameterIndex,
{
::osl::MutexGuard aGuard(m_aMutex);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
checkParameterIndex(nParameterIndex);
#if SAL_TYPES_SIZEOFPOINTER == 8
isc_blob_handle aBlobHandle = 0;
......@@ -668,19 +671,19 @@ void SAL_CALL OPreparedStatement::setBlob(sal_Int32 nParameterIndex,
}
void SAL_CALL OPreparedStatement::setArray( sal_Int32, const Reference< XArray >& )
void SAL_CALL OPreparedStatement::setArray( sal_Int32 nIndex, const Reference< XArray >& )
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
checkParameterIndex(nIndex);
}
void SAL_CALL OPreparedStatement::setRef( sal_Int32, const Reference< XRef >& )
void SAL_CALL OPreparedStatement::setRef( sal_Int32 nIndex, const Reference< XRef >& )
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
checkParameterIndex(nIndex);
}
......@@ -762,19 +765,19 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c
}
void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32, sal_Int32, const ::rtl::OUString& )
void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 nIndex, sal_Int32, const ::rtl::OUString& )
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
checkParameterIndex(nIndex);
}
void SAL_CALL OPreparedStatement::setObject( sal_Int32, const Any& )
void SAL_CALL OPreparedStatement::setObject( sal_Int32 nIndex, const Any& )
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
checkParameterIndex(nIndex);
}
void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex,
......@@ -782,6 +785,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex,
{
::osl::MutexGuard aGuard(m_aMutex);
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
checkParameterIndex(nParameterIndex);
#if SAL_TYPES_SIZEOFPOINTER == 8
isc_blob_handle aBlobHandle = 0;
......@@ -825,19 +829,19 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex,
}
void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32, const Reference< css::io::XInputStream >&, sal_Int32 )
void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 nIndex, const Reference< css::io::XInputStream >&, sal_Int32 )
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
checkParameterIndex(nIndex);
}
void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32, const Reference< css::io::XInputStream >&, sal_Int32 )
void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 nIndex, const Reference< css::io::XInputStream >&, sal_Int32 )
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
checkParameterIndex(nIndex);
}
......
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