summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-06-08 17:07:43 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2021-02-04 11:00:00 +0100
commitf7e6eaf84bebac565f462e2ce48f30808cc771eb (patch)
treed02dc088bc7cc5e0127be271cbe9fed505e42b6c /apt-pkg/pkgcachegen.h
parentc4da2ff42da55ffc38c77a9170dc151216d75962 (diff)
Avoid undefined pointer arithmetic while growing mmap
The undefined behaviour sanitizer complains with: runtime error: addition of unsigned offset to 0x… overflowed to 0x… Compilers and runtime do the right thing in any case and it is a codepath that can (and ideally should) be avoided for speed reasons alone, but fixing it can't hurt (too much).
Diffstat (limited to 'apt-pkg/pkgcachegen.h')
-rw-r--r--apt-pkg/pkgcachegen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h
index 62c171be4..f4781d715 100644
--- a/apt-pkg/pkgcachegen.h
+++ b/apt-pkg/pkgcachegen.h
@@ -146,7 +146,7 @@ class APT_HIDDEN pkgCacheGenerator /*{{{*/
MMap **OutMap,pkgCache **OutCache, bool AllowMem = false);
APT_PUBLIC static bool MakeOnlyStatusCache(OpProgress *Progress,DynamicMMap **OutMap);
- void ReMap(void const * const oldMap, void const * const newMap, size_t oldSize);
+ void ReMap(void const * const oldMap, void * const newMap, size_t oldSize);
bool Start();
pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress);