[Libreoffice-commits] core.git: dbaccess/source
Stephan Bergmann
sbergman at redhat.com
Fri Dec 4 06:32:54 PST 2015
dbaccess/source/core/dataaccess/datasource.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 58a3f5697808ca1db0c99b25e6f4d9e43dec16ba
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Dec 4 15:30:40 2015 +0100
UBSan: Bad static_cast from dbaccess::ODatabaseSource
...which doesn't inherit from cppu::OWeakObject in the first multiple-
inheritance slot
Change-Id: I1624e5c696d5a592f86e7c48849ecf3a39e1e6fb
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 00e9d3f..c3bbc79 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -1327,8 +1327,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL
com_sun_star_comp_dba_ODatabaseSource(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const &)
{
- css::uno::Reference< XDatabaseContext > xDBContext( DatabaseContext::create(context) );
- return cppu::acquire(static_cast<OWeakObject*>(xDBContext->createInstance().get()));
+ css::uno::Reference<XInterface> inst(
+ DatabaseContext::create(context)->createInstance());
+ inst->acquire();
+ return inst.get();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list