From c8383757fb031b2211cb6d1fdec7ac9045e72916 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 16 Nov 2012 14:00:10 +0000 Subject: valgrind: Invalid read from sequence released during assignation Change-Id: I3bb665e15e6f4ae7ada94a33a58633bd548d34f4 --- sw/qa/extras/rtfexport/rtfexport.cxx | 7 ++++--- sw/qa/extras/rtfimport/rtfimport.cxx | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'sw') 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 xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); uno::Sequence aProps = getProperty< uno::Sequence >(xDraws->getByIndex(0), "CustomShapeGeometry"); + uno::Sequence 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 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 xDrawPageSupplier(mxComponent, uno::UNO_QUERY); uno::Reference xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); uno::Sequence aProps = getProperty< uno::Sequence >(xDraws->getByIndex(0), "CustomShapeGeometry"); + uno::Sequence 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 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; } -- cgit