From ebcfcabde9ce1ade30a2933f5afc4c135cacf556 Mon Sep 17 00:00:00 2001 From: dsa-t Date: Wed, 30 Apr 2025 16:36:52 +0300 Subject: [PATCH] Don't write unused part of the buffer into image data. Fixes https://gitlab.com/kicad/code/kicad/-/issues/20698 (cherry picked from commit 3aded5da4bd5ddeec0622a40912e9a14ff786919) Co-authored-by: Alex Shvartzkop --- common/bitmap_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/bitmap_base.cpp b/common/bitmap_base.cpp index cf3a22c11e..0e5d4cda1b 100644 --- a/common/bitmap_base.cpp +++ b/common/bitmap_base.cpp @@ -208,7 +208,7 @@ bool BITMAP_BASE::SaveImageData( wxOutputStream& aOutStream ) const else { // Write the contents of m_imageData to the stream. - aOutStream.Write( m_imageData.GetData(), m_imageData.GetBufSize() ); + aOutStream.Write( m_imageData.GetData(), m_imageData.GetDataLen() ); } return true;