uGet crashes when download file > 4GB, crash in fill_bits. (Both 2.08/2.1.4 will crash)
int uget_a2cf_lack (UgetA2cf* a2cf, uint64_t* beg, uint64_t* end)
input beg/end are both 64bit, but all the calc for output like beg/end is base on 32bit. eg:
end = index * a2cf->piece_len + piece_end;
64bit 32bit 32bit 32bit
So this will cause a overflow when download > 4GB file, and uGet will crash in fill_bits functions.
After fix all calc in uget_a2cf_lack , it seems no problems with file big than 4GB.
Please help double check if any other code need to be fix ?