diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-08-13 15:41:34 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-08-14 09:30:45 +0200 |
commit | 926a112851c3e3a994acda4c7317fc8112d8917e (patch) | |
tree | af1ccea3dad2c7e9349b451b75a34cd72cfc4e26 | |
parent | d9ca7ddc78cbf99db6fed23a783bc8ecb74eb82f (diff) |
LwpObjectID::GetLow returns sal_uInt32
...and b7af008a35f48b821dd95f3d2d945f254bf4ed26 "remove first chunk of
lotuswordpro warnings" probably changed that in error:
void LwpGraphicObject::GetBentoNamebyID(LwpObjectID* pMyID, std::string& rName)
{
sal_uInt16 nHigh = pMyID->GetHigh();
- sal_uInt32 nLow = pMyID->GetLow();
+ sal_uInt16 nLow = pMyID->GetLow();
char pTempStr[32];
rName = std::string("Gr");
- sprintf(pTempStr, "%X,%lX", nHigh, nLow);
+ sprintf(pTempStr, "%X,%X", nHigh, nLow);
rName.append(pTempStr);
}
Found with new Clang -fsanitize=implicit-conversion during
CppunitTest_lotuswordpro_test_lotuswordpro:
> Testing file:///home/sbergman/lo/core/lotuswordpro/qa/cppunit/data/pass/IntPres11-2004.lwp:
> lotuswordpro/source/filter/lwpgrfobj.cxx:321:23: runtime error: implicit conversion from type 'sal_uInt32' (aka 'unsigned int') of value 1085767199 (32-bit, unsigned) to type 'sal_uInt16' (aka 'unsigned short') changed the value to 32287 (16-bit, unsigned)
> #0 in LwpGraphicObject::GetBentoNamebyID(LwpObjectID const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) at lotuswordpro/source/filter/lwpgrfobj.cxx:321:23 (instdir/program/liblwpftlo.so +0x948b85)
> #1 in LwpGraphicObject::GetRawGrafData() at lotuswordpro/source/filter/lwpgrfobj.cxx:352:5 (instdir/program/liblwpftlo.so +0x940cae)
> #2 in LwpGraphicObject::XFConvert(XFContentContainer*) at lotuswordpro/source/filter/lwpgrfobj.cxx:228:48 (instdir/program/liblwpftlo.so +0x93e1af)
> #3 in LwpObject::DoXFConvert(XFContentContainer*) at lotuswordpro/inc/lwpobj.hxx:129:9 (instdir/program/liblwpftlo.so +0x84a472)
> #4 in LwpFrameLayout::XFConvertFrame(XFContentContainer*, int, int, bool) at lotuswordpro/source/filter/lwpframelayout.cxx:836:26 (instdir/program/liblwpftlo.so +0x87ba7b)
> #5 in LwpFrameLayout::XFConvert(XFContentContainer*) at lotuswordpro/source/filter/lwpframelayout.cxx:800:13 (instdir/program/liblwpftlo.so +0x87b1b0)
> #6 in LwpObject::DoXFConvert(XFContentContainer*) at lotuswordpro/inc/lwpobj.hxx:129:9 (instdir/program/liblwpftlo.so +0x84a472)
> #7 in LwpFribFrame::XFConvert(XFContentContainer*) at lotuswordpro/source/filter/lwpfribframe.cxx:183:14 (instdir/program/liblwpftlo.so +0x8a6382)
> #8 in LwpFribPtr::XFConvert() at lotuswordpro/source/filter/lwpfribptr.cxx:280:24 (instdir/program/liblwpftlo.so +0x8f187d)
> #9 in LwpPara::XFConvert(XFContentContainer*) at lotuswordpro/source/filter/lwppara.cxx:258:13 (instdir/program/liblwpftlo.so +0xa608a1)
> #10 in LwpStory::XFConvert(XFContentContainer*) at lotuswordpro/source/filter/lwpstory.cxx:110:16 (instdir/program/liblwpftlo.so +0xae1e1a)
> #11 in LwpStory::Parse(IXFStream*) at lotuswordpro/source/filter/lwpstory.cxx:156:5 (instdir/program/liblwpftlo.so +0xae6aa7)
> #12 in LwpObject::DoParse(IXFStream*) at lotuswordpro/inc/lwpobj.hxx:119:9 (instdir/program/liblwpftlo.so +0x7a4802)
> #13 in LwpPageLayout::Parse(IXFStream*) at lotuswordpro/source/filter/lwppagelayout.cxx:120:17 (instdir/program/liblwpftlo.so +0xa1885d)
> #14 in LwpObject::DoParse(IXFStream*) at lotuswordpro/inc/lwpobj.hxx:119:9 (instdir/program/liblwpftlo.so +0x7a4802)
> #15 in LwpDocument::ParseDocContent(IXFStream*) at lotuswordpro/source/filter/lwpdoc.cxx:428:17 (instdir/program/liblwpftlo.so +0x794de5)
> #16 in LwpDocument::Parse(IXFStream*) at lotuswordpro/source/filter/lwpdoc.cxx:158:9 (instdir/program/liblwpftlo.so +0x792f6a)
> #17 in LwpObject::DoParse(IXFStream*) at lotuswordpro/inc/lwpobj.hxx:119:9 (instdir/program/liblwpftlo.so +0x7a4802)
> #18 in LwpDocSock::Parse(IXFStream*) at lotuswordpro/source/filter/lwpdoc.cxx:816:15 (instdir/program/liblwpftlo.so +0x7a3a4f)
> #19 in LwpObject::DoParse(IXFStream*) at lotuswordpro/inc/lwpobj.hxx:119:9 (instdir/program/liblwpftlo.so +0x7a4802)
> #20 in LwpDocument::Parse(IXFStream*) at lotuswordpro/source/filter/lwpdoc.cxx:164:19 (instdir/program/liblwpftlo.so +0x793148)
> #21 in Lwp9Reader::ParseDocument() at lotuswordpro/source/filter/lwp9reader.cxx:167:10 (instdir/program/liblwpftlo.so +0x6f52a1)
> #22 in Lwp9Reader::Read() at lotuswordpro/source/filter/lwp9reader.cxx:90:20 (instdir/program/liblwpftlo.so +0x6f3fbc)
> #23 in ReadWordproFile(SvStream&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&) at lotuswordpro/source/filter/lwpfilter.cxx:215:33 (instdir/program/liblwpftlo.so +0x82442d)
> #24 in LotusWordProImportFilter::importImpl(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lotuswordpro/source/filter/LotusWordProImportFilter.cxx:75:14 (instdir/program/liblwpftlo.so +0x6e4aca)
> #25 in LotusWordProImportFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at lotuswordpro/source/filter/LotusWordProImportFilter.cxx:87:12 (instdir/program/liblwpftlo.so +0x6e4d8a)
> #26 in (anonymous namespace)::LotusWordProTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at lotuswordpro/qa/cppunit/test_lotuswordpro.cxx:59:27 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x14a52)
> #27 in test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at unotest/source/cpp/filters-test.cxx:130:20 (workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x5724c)
> #28 in test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at unotest/source/cpp/filters-test.cxx:155:5 (workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x57ec9)
> #29 in (anonymous namespace)::LotusWordProTest::test() at lotuswordpro/qa/cppunit/test_lotuswordpro.cxx:64:9 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x153d4)
> #30 in void std::__invoke_impl<void, void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>(std::__invoke_memfun_deref, void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/invoke.h:73:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17fcd)
> #31 in std::__invoke_result<void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>::type std::__invoke<void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&>(void ((anonymous namespace)::LotusWordProTest::*&)(), (anonymous namespace)::LotusWordProTest*&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/invoke.h:95:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17c6b)
> #32 in void std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/functional:400:11 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x17b28)
> #33 in void std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()>::operator()<void>() at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/functional:482:17 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x178e5)
> #34 in std::_Function_handler<void (), std::_Bind<void ((anonymous namespace)::LotusWordProTest::* ((anonymous namespace)::LotusWordProTest*))()> >::_M_invoke(std::_Any_data const&) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/std_function.h:297:2 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x16bc6)
> #35 in std::function<void ()>::operator()() const at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/std_function.h:687:14 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x23276)
> #36 in CppUnit::TestCaller<(anonymous namespace)::LotusWordProTest>::runTest() at workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 (workdir/LinkTarget/CppunitTest/libtest_lotuswordpro_test_lotuswordpro.so +0x160c6)
> #37 in CppUnit::TestCaseMethodFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22c1f1)
> #38 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at test/source/vclbootstrapprotector.cxx:49:14 (workdir/LinkTarget/Library/libvclbootstrapprotector.so +0x159a)
> #39 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d)
> #40 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:88:12 (workdir/LinkTarget/Library/unobootstrapprotector.so +0x987a)
> #41 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d)
> #42 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63:16 (workdir/LinkTarget/Library/unoexceptionprotector.so +0x5000)
> #43 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d)
> #44 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x1c6c51)
> #45 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x20e64d)
> #46 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) at workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x2096b8)
> #47 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182:28 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x26c3e4)
> #48 in CppUnit::TestCase::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22b1fb)
> #49 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22db43)
> #50 in CppUnit::TestComposite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22d119)
> #51 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22db43)
> #52 in CppUnit::TestComposite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x22d119)
> #53 in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x28b6c2)
> #54 in CppUnit::TestResult::runTest(CppUnit::Test*) at workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:9 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x26b715)
> #55 in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14 (workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.14.so.0 +0x28c103)
> #56 in (anonymous namespace)::ProtectedFixtureFunctor::run() const at sal/cppunittester/cppunittester.cxx:316:20 (workdir/LinkTarget/Executable/cppunittester +0x440697)
> #57 in sal_main() at sal/cppunittester/cppunittester.cxx:466:20 (workdir/LinkTarget/Executable/cppunittester +0x43e2fc)
> #58 in main at sal/cppunittester/cppunittester.cxx:373:1 (workdir/LinkTarget/Executable/cppunittester +0x43d90e)
> #59 in __libc_start_main at /usr/src/debug/glibc-2.27-74-g68c1bf8097/csu/../csu/libc-start.c:308:16 (/lib64/libc.so.6 +0x2324a)
> #60 in _start at <null> (workdir/LinkTarget/Executable/cppunittester +0x4172a9)
Change-Id: I90f3ed9efa56359005e84732139452acacbaa0ad
Reviewed-on: https://gerrit.libreoffice.org/58937
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Jenkins
-rw-r--r-- | lotuswordpro/source/filter/lwpgrfobj.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx index dcfee796bbb1..c732b611a0f1 100644 --- a/lotuswordpro/source/filter/lwpgrfobj.cxx +++ b/lotuswordpro/source/filter/lwpgrfobj.cxx @@ -318,7 +318,7 @@ void LwpGraphicObject::CreateDrawObjects() void LwpGraphicObject::GetBentoNamebyID(LwpObjectID const & rMyID, std::string& rName) { sal_uInt16 nHigh = rMyID.GetHigh(); - sal_uInt16 nLow = rMyID.GetLow(); + sal_uInt32 nLow = rMyID.GetLow(); char pTempStr[32]; rName = std::string("Gr"); sprintf(pTempStr, "%X,%X", nHigh, nLow); |