summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-03-02 18:19:18 +0100
committerDavid Tardon <dtardon@redhat.com>2015-03-03 09:04:23 +0000
commite5611f0cf876817a19500861a7d508e6469ad7c0 (patch)
tree1f495cb8efed0098dfe65c41c5302810c3a92d5c /connectivity
parent8d50a8286b84a5b7b783c91c81248dc71e94340d (diff)
getAny() is not a safe default, it assumes there is actually an Any
at *m_aValue.m_pValue. But there could not even be a pointer there, e.g. if m_aValue.m_nIntXX is in use. Then the pointer dereference usually leads to a crash. Can e.g. be reproduced by calling getBytes() on an integer column of a RowSet. Change-Id: Ib5361d838d2869142fd797d4e3454e2562ea7acf Reviewed-on: https://gerrit.libreoffice.org/14718 Tested-by: David Tardon <dtardon@redhat.com> Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/FValue.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 8e63f87f9e5e..cc53d24d84ed 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -965,7 +965,7 @@ Any ORowSetValue::makeAny() const
break;
default:
SAL_WARN( "connectivity.commontools","ORowSetValue::makeAny(): UNSPUPPORTED TYPE!");
- rValue = getAny();
+ rValue = makeAny();
break;
}
}
@@ -1050,7 +1050,7 @@ OUString ORowSetValue::getString( ) const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= aRet;
break;
}
@@ -1121,7 +1121,7 @@ bool ORowSetValue::getBool() const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= bRet;
break;
}
@@ -1192,7 +1192,7 @@ sal_Int8 ORowSetValue::getInt8() const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= nRet;
break;
}
@@ -1263,7 +1263,7 @@ sal_uInt8 ORowSetValue::getUInt8() const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= nRet;
break;
}
@@ -1335,7 +1335,7 @@ sal_Int16 ORowSetValue::getInt16() const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= nRet;
break;
}
@@ -1406,7 +1406,7 @@ sal_uInt16 ORowSetValue::getUInt16() const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= nRet;
break;
}
@@ -1479,7 +1479,7 @@ sal_Int32 ORowSetValue::getInt32() const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= nRet;
break;
}
@@ -1552,7 +1552,7 @@ sal_uInt32 ORowSetValue::getUInt32() const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= nRet;
break;
}
@@ -1625,7 +1625,7 @@ sal_Int64 ORowSetValue::getLong() const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= nRet;
break;
}
@@ -1698,7 +1698,7 @@ sal_uInt64 ORowSetValue::getULong() const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= nRet;
break;
}
@@ -1775,7 +1775,7 @@ float ORowSetValue::getFloat() const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= nRet;
break;
}
@@ -1851,7 +1851,7 @@ double ORowSetValue::getDouble() const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= nRet;
break;
}
@@ -1922,7 +1922,7 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const
break;
default:
{
- Any aValue = getAny();
+ Any aValue = makeAny();
aValue >>= aSeq;
break;
}
@@ -2025,7 +2025,7 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const
break;
default:
{
- Any aAnyValue = getAny();
+ Any aAnyValue = makeAny();
aAnyValue >>= aValue;
break;
}
@@ -2077,7 +2077,7 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const
break;
default:
{
- Any aAnyValue = getAny();
+ Any aAnyValue = makeAny();
aAnyValue >>= aValue;
break;
}