os icon indicating copy to clipboard operation
os copied to clipboard

Fix: Handle nginx-stable mail module size corruption (#73275)

Open BHAVISHYA2005 opened this issue 1 month ago • 0 comments

Fix: Handle nginx-stable mail module size corruption (#73275)

Fixes: #73275

Related: N/A

Description

The nginx-stable-mod-mail subpackage was generating a corrupted size field in the APKINDEX, reporting an impossible size of 18446744073709551615 (UINT64_MAX / 2^64-1) instead of the actual package size.

Root Cause

The mail module subpackage extraction was failing silently:

  • Mail is configured as --with-mail=dynamic (should generate a .so file)
  • The pipeline tries to move ngx_mail_module.so but it doesn't exist in the expected location
  • The empty/malformed subpackage causes a size calculation overflow in melange
  • Result: Size field gets set to UINT64_MAX

Solution

Added specific error handling for the mail module case in the subpackage pipeline:

  • Check if ngx_mail_module.so exists before attempting to move it
  • Log a warning if the file is not found

Verification

The issue was reproduced with:

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

BHAVISHYA2005 avatar Nov 27 '25 04:11 BHAVISHYA2005