Add ULL postfix to FILE_SIZE_THRESHOLD to avoid using int

Otherwise, cli->size > FILE_SIZE_THRESHOLD uses 32-bit integer which
overflows with very large files. Use ULL to enforce 64-bits.
master
tiptorrent development team 2021-09-08 17:26:20 +02:00
parent 9523d7d8fd
commit a3ea145290
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ extern int max_clients;
extern int num_clients;
extern bool redirect;
/* max_client logic only applies for files larger than 1024 bytes. */
#define FILE_SIZE_THRESHOLD 1024
#define FILE_SIZE_THRESHOLD 1024ULL
enum tip_client_state {
TIP_CLIENT_PENDING = 0,