libreoffice-online/kit
Caolán McNamara d3ecb6c95f the tile is assumed to be 256 in width
but as seen with unit-tiletest that is not always the case

==24170==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x63400001e808 at pc 0x558a6f505973 bp 0x7ffc0670e7d0 sp 0x7ffc0670e7c8
READ of size 8 at 0x63400001e808 thread T0 (kitbroker_002)
    #0 0x558a6f505972 in DeltaGenerator::DeltaBitmapRow::initRow(unsigned int const*, unsigned int) Delta.hpp:129:36
    #1 0x558a6f4fc318 in DeltaGenerator::DeltaData::DeltaData(unsigned int, unsigned char*, unsigned long, unsigned long, int, int, TileLocation const&, int, int) Delta.hpp:233:21
    #2 0x558a6f4f8a22 in DeltaGenerator::createDelta(unsigned char*, unsigned long, unsigned long, int, int, int, int, TileLocation const&, std::vector<char, std::allocator<char> >&, unsigned int, bool) Delta.hpp:574:17
    #3 0x558a6f4f2a35 in DeltaGenerator::compressOrDelta(unsigned char*, unsigned long, unsigned long, int, int, int, int, TileLocation const&, std::vector<char, std::allocator<char> >&, unsigned int, bool, bool, LibreOfficeKitTileMode) Delta.hpp:669:14
    #4 0x558a6f41f300 in RenderTiles::doRender(std::shared_ptr<lok::Document>, DeltaGenerator&, TileCombined&, ThreadPool&, bool, std::function<void (unsigned char*, int, int, unsigned long, unsigned long, int, int, LibreOfficeKitTileMode)> const&, std::function<void (char const*, unsigned long)> const&, unsigned int, int, bool)::$_0::operator()() const /home/vmiklos/git/libreoffice/online-san/./common/RenderTiles.hpp:304:38

so just use the rle cache for the first 256 pixels

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8d34ea53bd20b69184e100b56017dfc0a904eaab
2023-06-21 21:31:48 +01:00
..
ChildSession.cpp support callback for changing the color palette 2023-06-09 14:30:45 +02:00
ChildSession.hpp Add debug option that allows tile dumping 2023-06-05 08:59:39 +01:00
Delta.hpp the tile is assumed to be 256 in width 2023-06-21 21:31:48 +01:00
DummyLibreOfficeKit.cpp masterpage: use mode for tile rendering 2022-11-17 11:42:24 +01:00
DummyLibreOfficeKit.hpp
ForKit.cpp wsd: test: initialize logs before unit-tests 2023-05-31 07:40:11 -04:00
Kit.cpp cid#318977 AUTO_CAUSES_COPY 2023-06-14 10:10:46 +02:00
Kit.hpp cid#318908 Uninitialized scalar field 2023-06-14 10:10:46 +02:00
KitHelper.hpp Introduce getDataArea in Calc 2022-11-10 12:12:10 +03:00
SetupKitEnvironment.hpp
TestStubs.cpp
Watermark.hpp