When dos_date is 1, mz_zip_dosdate_to_raw_tm should return a date in year 1979.
But the cast with (uint16_t) is incorrectly converting -1 to 65535, which turns the date to year 7441.
The issue may have originated from 35c6102e21d76019206154de07b8bb8577018825 or earlier (in unzip.c, ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ;)
When
dos_date
is1
,mz_zip_dosdate_to_raw_tm
should return a date in year 1979. But the cast with(uint16_t)
is incorrectly converting-1
to65535
, which turns the date to year 7441.The issue may have originated from 35c6102e21d76019206154de07b8bb8577018825 or earlier (in unzip.c,
ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ;
)It was fixed in the legacy minizip about three years ago: https://github.com/madler/zlib/commit/2014a993addbc8f1b9785d97f55fd189792c2f78