diff options
| author | David Kalnischkies <david@kalnischkies.de> | 2025-01-30 15:22:14 +0000 |
|---|---|---|
| committer | David Kalnischkies <david@kalnischkies.de> | 2025-01-30 15:22:14 +0000 |
| commit | 2e39d0fdeff5f9db91b3490d6750c8033aca9057 (patch) | |
| tree | 5bbe0ae317421e78b6a15ebf5bc126dd5afb3bdc /apt-pkg/pkgcache.h | |
| parent | 945ead2ab03b7c83b3fbaecf3e1e543525e476f0 (diff) | |
Do not overflow ver/desc<->file relation counters
The counters aren't used for anything really except for the 'stats'
command that is off in its display and calculation due to 16bit not
being enough for counting all the relations we have.
Semi-broken more than a decade ago as I accidentally aligned it with
the other file relation counters which count far less frequent ones
through, so 'unsigned long' should have been changed to the id type
rather than the smaller fileid type.
Of course, this commit only prepares the fix as this would be an ABI
break, so with the current ABI we are still overflowing.
Regression-of: 4ad8619bb1f0bf777d17c568bb7a6cf7f30aac34
Diffstat (limited to 'apt-pkg/pkgcache.h')
| -rw-r--r-- | apt-pkg/pkgcache.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 476a01514..f6d0ea097 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -341,8 +341,13 @@ struct pkgCache::Header map_id_t DependsDataCount; map_fileid_t ReleaseFileCount; map_fileid_t PackageFileCount; +#if APT_PKG_ABI <= 600 map_fileid_t VerFileCount; map_fileid_t DescFileCount; +#else + map_id_t VerFileCount; + map_id_t DescFileCount; +#endif map_id_t ProvidesCount; /** \brief index of the first PackageFile structure |
