diff options
Diffstat (limited to 'connectivity/source/drivers/postgresql/pq_xcolumns.cxx')
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_xcolumns.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx index 6caf1decc6c6..f1d3c0a53e88 100644 --- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx @@ -38,6 +38,7 @@ #include <string_view> +#include <o3tl/safeint.hxx> #include <o3tl/string_view.hxx> #include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> @@ -492,7 +493,7 @@ void Columns::appendByDescriptor( void Columns::dropByIndex( sal_Int32 index ) { osl::MutexGuard guard( m_xMutex->GetMutex() ); - if( index < 0 || index >= static_cast<sal_Int32>(m_values.size()) ) + if( index < 0 || o3tl::make_unsigned(index) >= m_values.size() ) { throw css::lang::IndexOutOfBoundsException( "COLUMNS: Index out of range (allowed 0 to " |