os icon indicating copy to clipboard operation
os copied to clipboard

nginx-stable-mod-mail package has corrupted size field in APKINDEX

Open tks98 opened this issue 1 month ago • 1 comments

Hi all,

I was trying to determine the full size of the compressed x86 packages at packages.wolfi.dev and ran into a package that has an corrupt size field causing my calculation to return 17 Billion GB total, lol.

curl -s https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz | tar -xzf - APKINDEX
grep -B5 "^S:18446744073709551615" APKINDEX

C:Q1VBI5MTSSDXhDoGXhRNCy1lguvtM=
P:nginx-stable-mod-mail
V:1.26.2-r2
A:x86_64
S:18446744073709551615

The value is 18446744073709551615 (2^64 - 1 / UINT64_MAX), which appears to be -1 interpreted as an unsigned 64-bit integer.

For reference, filtering out this entry gives a more realistic size.

grep "^S:" APKINDEX | cut -d: -f2 | awk '$1 < 100000000000 {sum+=$1} END {printf "%.2f GB\n", sum/1024/1024/1024}'
# 1950.80 GB

Wanted to open this in case this could be causing issues for anyone.

Thank you

tks98 avatar Nov 26 '25 19:11 tks98

@murraybd I was not able to complete full tests because I don't have the authorization to do actual build as it requires some access, I guess

BHAVISHYA2005 avatar Nov 27 '25 05:11 BHAVISHYA2005