From 6ee6340bae8a44b9257db3d7729e0018e1addb3d Mon Sep 17 00:00:00 2001 From: David Steele Date: Tue, 9 Feb 2021 11:05:46 +0000 Subject: [PATCH] Fixed memory scribbler in text vector blob In the case where mTextureWidth was greater than the width passed in, the texture copy was scribbling outside the pixbuf array. Changed it to use the width passed in, so the pixbuf array should contain only the required blob data. Change-Id: I6e7dcbf9bd9a12df06319c81448ae9641751b85a Signed-off-by: David Steele --- dali-toolkit/internal/text/rendering/vector-based/vector-blob-atlas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dali-toolkit/internal/text/rendering/vector-based/vector-blob-atlas.cpp b/dali-toolkit/internal/text/rendering/vector-based/vector-blob-atlas.cpp index 3b4270d..0f11c11 100644 --- a/dali-toolkit/internal/text/rendering/vector-based/vector-blob-atlas.cpp +++ b/dali-toolkit/internal/text/rendering/vector-based/vector-blob-atlas.cpp @@ -195,7 +195,7 @@ void VectorBlobAtlas::TexSubImage(unsigned int offsetX, size_t dataIndex = 0; for(size_t y = 0; y < height; y++) { - pos = y * mTextureWidth * 4; + pos = y * width * 4; for(size_t x = 0; x < width; x++) { pixbuf[pos + x * 4] = 0xFF & blob[dataIndex].r; -- 2.7.4