1. 25 Agu, 2015 35 kayıt (commit)
  2. 24 Agu, 2015 5 kayıt (commit)
    • Daniel Robertson's avatar
      slideshow: replace for_each with range-based loop · ead5bc3c
      Daniel Robertson yazdı
      Replace ::std::for_each for a more readable range-based for loop in
      cases in which the function object to be applied by for_each is more
      readable as the body of a for loop.
      
      Change-Id: Ib0b488b36ed58c65c56357e04391b85096d043aa
      Reviewed-on: https://gerrit.libreoffice.org/17930Tested-by: 's avatarJenkins <ci@libreoffice.org>
      Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
      ead5bc3c
    • Caolán McNamara's avatar
      in reality we are limited to max sal_Int32 here · 0a76c1fd
      Caolán McNamara yazdı
      so accept that and test if the values were accepted or limited
      
      Change-Id: Iaed5ebc2f12b52055506147c71117a2ad88d28ac
      0a76c1fd
    • Caolán McNamara's avatar
      consider validity of m_nDrawCpO · 8329eb5e
      Caolán McNamara yazdı
      Change-Id: Ifbd131440bad6d840d369c99628cb8904697ad96
      8329eb5e
    • Stephan Bergmann's avatar
      Handle GetBaseCp overflow · d281b460
      Stephan Bergmann yazdı
      ...as found by UBSan in CppunitTest_sw_filters_test (see below); note the TODOs
      how best to report the errors up the call stack.
      
      > Testing file:///.../sw/qa/core/data/ww6/pass/crash-3.doc:
      > sw/source/filter/ww8/ww8scan.cxx:5240:63: runtime error: signed integer overflow: 1766665948 + 1768712052 cannot be represented in type 'int'
      >  WW8Fib::GetBaseCp(ManTypes) const sw/source/filter/ww8/ww8scan.cxx:5240:63
      >  SwWW8ImplReader::Read_GrafLayer(long) sw/source/filter/ww8/ww8graf.cxx:2393:18
      >  SwWW8ImplReader::ReadChar(long, long) sw/source/filter/ww8/ww8par.cxx:3630:17
      >  SwWW8ImplReader::ReadChars(int&, int, long, long) sw/source/filter/ww8/ww8par.cxx:3432:27
      >  SwWW8ImplReader::ReadText(int, int, ManTypes) sw/source/filter/ww8/ww8par.cxx:3970:22
      >  SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) sw/source/filter/ww8/ww8par.cxx:5169:9
      >  SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:5767:19
      >  SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:6039:19
      >  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) sw/source/filter/ww8/ww8par.cxx:6157:20
      >  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
      >  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
      >  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
      >  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) sw/qa/core/filters-test.cxx:112:20
      >  SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) sw/qa/core/filters-test.cxx:71:12
      >  test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:129:20
      >  test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:154:5
      >  SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5
      
      Change-Id: I0b14f5c1e025565eb131e64590b7d5ff0135e767
      Reviewed-on: https://gerrit.libreoffice.org/17965Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
      Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
      d281b460
    • Stephan Bergmann's avatar
      Handle zero nPLCF · 1a871f9d
      Stephan Bergmann yazdı
      ...as found by ASan in CppunitTest_sw_filters_test:
      
      > Testing file:///.../sw/qa/core/data/ww6/pass/crash-1.doc:
      > ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020009382b0 at pc 0x2b1dcb5eabac bp 0x7fffe8ccbdb0 sp 0x7fffe8ccbda8
      > READ of size 4 at 0x6020009382b0 thread T0
      >  WW8PLCF::SeekPos(int) sw/source/filter/ww8/ww8scan.cxx:2219:14
      >  WW8PLCF::WW8PLCF(SvStream&, int, int, int, int, int, int) sw/source/filter/ww8/ww8scan.cxx:2080:9
      >  WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream*, SvStream*, SvStream*, WW8Fib const&, ePLCFT, int) sw/source/filter/ww8/ww8scan.cxx:2883:21
      >  WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP(SvStream*, SvStream*, SvStream*, WW8ScannerBase const&, ePLCFT) sw/source/filter/ww8/ww8scan.cxx:3088:7
      >  WW8ScannerBase::WW8ScannerBase(SvStream*, SvStream*, SvStream*, WW8Fib*) sw/source/filter/ww8/ww8scan.cxx:1588:20
      >  SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) sw/source/filter/ww8/ww8par.cxx:5022:20
      >  SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:5767:19
      >  SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:6039:19
      >  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) sw/source/filter/ww8/ww8par.cxx:6157:20
      >  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
      >  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
      >  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
      >  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) sw/qa/core/filters-test.cxx:112:20
      >  SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) sw/qa/core/filters-test.cxx:71:12
      >  test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:129:20
      >  test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:154:5
      >  SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5
      > 0x6020009382b1 is located 0 bytes to the right of 1-byte region [0x6020009382b0,0x6020009382b1)
      > allocated by thread T0 here:
      >  operator new[](unsigned long) /home/sbergman/clang/trunk/src/projects/compiler-rt/lib/asan/asan_new_delete.cc:64
      >  WW8PLCF::ReadPLCF(SvStream&, int, unsigned int) sw/source/filter/ww8/ww8scan.cxx:2091:26
      >  WW8PLCF::WW8PLCF(SvStream&, int, int, int, int, int, int) sw/source/filter/ww8/ww8scan.cxx:2075:9
      >  WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream*, SvStream*, SvStream*, WW8Fib const&, ePLCFT, int) sw/source/filter/ww8/ww8scan.cxx:2883:21
      >  WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP(SvStream*, SvStream*, SvStream*, WW8ScannerBase const&, ePLCFT) sw/source/filter/ww8/ww8scan.cxx:3088:7
      >  WW8ScannerBase::WW8ScannerBase(SvStream*, SvStream*, SvStream*, WW8Fib*) sw/source/filter/ww8/ww8scan.cxx:1588:20
      >  SwWW8ImplReader::CoreLoad(WW8Glossary*, SwPosition const&) sw/source/filter/ww8/ww8par.cxx:5022:20
      >  SwWW8ImplReader::LoadThroughDecryption(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:5767:19
      >  SwWW8ImplReader::LoadDoc(SwPaM&, WW8Glossary*) sw/source/filter/ww8/ww8par.cxx:6039:19
      >  WW8Reader::Read(SwDoc&, rtl::OUString const&, SwPaM&, rtl::OUString const&) sw/source/filter/ww8/ww8par.cxx:6157:20
      >  SwReader::Read(Reader const&) sw/source/filter/basflt/shellio.cxx:175:18
      >  SwDocShell::ConvertFrom(SfxMedium&) sw/source/uibase/app/docsh.cxx:258:22
      >  SfxObjectShell::DoLoad(SfxMedium*) sfx2/source/doc/objstor.cxx:790:23
      >  SwFiltersTest::filter(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) sw/qa/core/filters-test.cxx:112:20
      >  SwFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) sw/qa/core/filters-test.cxx:71:12
      >  test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:129:20
      >  test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) unotest/source/cpp/filters-test.cxx:154:5
      >  SwFiltersTest::testCVEs() sw/qa/core/filters-test.cxx:154:5
      
      Change-Id: I97d995aad621b829b6fb6ee4622d386fec0bedea
      Reviewed-on: https://gerrit.libreoffice.org/17963Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
      Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
      1a871f9d