Asan fix warning for 1-bit vert #2

try #2 at this
if there isn't enough data remaining to fill the columns
then don't read any more data

looking at the blame for this driver it had similar logic originally

But really on native this is just extra overhead so..
Ifdef out for native

Change-Id: I105dea1f7adc0448f345b268fcfa8574333132a9
This commit is contained in:
William Wilgus 2025-03-11 01:17:12 -04:00 committed by William Wilgus
parent c31234bc32
commit 69664cc4e9

View file

@ -402,9 +402,6 @@ void ICODE_ATTR LCDFN(bitmap_part)(const unsigned char *src, int src_x,
}
else
{
if (height <= 8)
stride = 0; /* ASAN fix keep from reading beyond buffer */
dst_end = dst + width;
do
{
@ -429,7 +426,10 @@ void ICODE_ATTR LCDFN(bitmap_part)(const unsigned char *src, int src_x,
dst_col += stride_dst;
data >>= 8;
}
data |= *src_col << shift;
#if !(CONFIG_PLATFORM & PLATFORM_NATIVE)
if (y>=shift) /* ASAN fix keep from reading beyond buffer */
#endif
data |= *src_col << shift;
bfunc(dst_col, mask_col & mask_bottom, data);
}
while (dst < dst_end);