uGet crashes when download file > 4GB, crash in fill_bits

Find a Bug in the app, site or forums? Please report it immediately so we can squash it as soon as possible.

uGet crashes when download file > 4GB, crash in fill_bits

Postby weiweitm » Wed Jan 04, 2017 12:03 am

uGet crashes when download file > 4GB, crash in fill_bits. (Both 2.08/2.1.4 will crash)
Root cause:
UgetA2cf.c
int uget_a2cf_lack (UgetA2cf* a2cf, uint64_t* beg, uint64_t* end)
uint32_t index;
uint32_t piece_beg;
uint32_t piece_end;

input beg/end are both 64bit, but all the calc for output like beg/end is base on 32bit. eg:
end[0] = 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 ?
weiweitm
 
Posts: 1
Joined: Tue Jan 03, 2017 11:49 pm
uGet Version: 2.08/2.14
Operating System: Windows
System Architecture: 32bit

Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron