From: Aleš Matěj Date: Fri, 6 Mar 2026 08:25:17 +0000 (+0100) Subject: map_and: fix writing outside of target map memory X-Git-Tag: 0.7.36~8^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=refs%2Fpull%2F609%2Fhead;p=thirdparty%2Flibsolv.git map_and: fix writing outside of target map memory `ti` already points somewhere in the target, depending on the source size, adding full `t->size` goes out of bounds. --- diff --git a/src/bitmap.c b/src/bitmap.c index 2a708342..d482eddc 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -69,7 +69,7 @@ map_and(Map *t, const Map *s) end = ti + (t->size < s->size ? t->size : s->size); while (ti < end) *ti++ &= *si++; - end = ti + t->size; + end = t->map + t->size; while (ti < end) *ti++ = 0; }