rle data size is two bytes not one

==3858==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow
/usr/bin/coolforkit
	__asan_memcpy
		asan/asan_interceptors_memintrinsics.cpp:22
/usr/bin/coolforkit
	DeltaGenerator::copy_row(unsigned char*, unsigned char const*, unsigned int, LibreOfficeKitTileMode)
		online/./kit/Delta.hpp:522
/usr/bin/coolforkit
	DeltaGenerator::DeltaBitmapRow::packForNetwork(unsigned char*, LibreOfficeKitTileMode) const
		online/./kit/Delta.hpp:175

presumably an issue since:

commit a9d4dcb71d
Date:   Mon Jun 10 17:07:00 2024 +0100

    deltas: zstd compress already RLE compressed pixels.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iba3288a3efc3f6df3411ff2ecc66ce5d89693ea2
This commit is contained in:
Caolán McNamara 2024-07-04 09:52:31 +01:00 committed by Andras Timar
parent 463d57ba8f
commit 1414c4485f

View file

@ -837,7 +837,7 @@ class DeltaGenerator {
outb.size = maxCompressed;
outb.pos = 0;
unsigned char packedLine[1 + spaceForBitmask + width * 4];
unsigned char packedLine[2 + spaceForBitmask + width * 4];
for (int y = 0; y < height; ++y)
{