diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-11-16 14:00:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-11-17 20:10:51 +0000 |
commit | c8383757fb031b2211cb6d1fdec7ac9045e72916 (patch) | |
tree | 681cd9cd5754ad4d6ad62eeefa834f8535777157 /sw | |
parent | aa2f6cf0012214953c72b3b37bdde560ced2430b (diff) |
valgrind: Invalid read from sequence released during assignation
Change-Id: I3bb665e15e6f4ae7ada94a33a58633bd548d34f4
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 7 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 960147140808..de5bfe6e08cb 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -412,16 +412,17 @@ void Test::testFdo53113() uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aProps = getProperty< uno::Sequence<beans::PropertyValue> >(xDraws->getByIndex(0), "CustomShapeGeometry"); + uno::Sequence<beans::PropertyValue> aPathProps; for (int i = 0; i < aProps.getLength(); ++i) { const beans::PropertyValue& rProp = aProps[i]; if (rProp.Name == "Path") - rProp.Value >>= aProps; + rProp.Value >>= aPathProps; } uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aPairs; - for (int i = 0; i < aProps.getLength(); ++i) + for (int i = 0; i < aPathProps.getLength(); ++i) { - const beans::PropertyValue& rProp = aProps[i]; + const beans::PropertyValue& rProp = aPathProps[i]; if (rProp.Name == "Coordinates") rProp.Value >>= aPairs; } diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index c24c87aad9cb..c8eec60d9b4a 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -775,16 +775,17 @@ void Test::testInk() uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aProps = getProperty< uno::Sequence<beans::PropertyValue> >(xDraws->getByIndex(0), "CustomShapeGeometry"); + uno::Sequence<beans::PropertyValue> aPathProps; for (int i = 0; i < aProps.getLength(); ++i) { const beans::PropertyValue& rProp = aProps[i]; if (rProp.Name == "Path") - rProp.Value >>= aProps; + rProp.Value >>= aPathProps; } uno::Sequence<drawing::EnhancedCustomShapeSegment> aSegments; - for (int i = 0; i < aProps.getLength(); ++i) + for (int i = 0; i < aPathProps.getLength(); ++i) { - const beans::PropertyValue& rProp = aProps[i]; + const beans::PropertyValue& rProp = aPathProps[i]; if (rProp.Name == "Segments") rProp.Value >>= aSegments; } |