diff options
author | tiptorrent development team <tiptorrent@soleta.eu> | 2021-09-08 17:26:20 +0200 |
---|---|---|
committer | tiptorrent development team <tiptorrent@soleta.eu> | 2021-09-29 15:47:58 +0200 |
commit | a3ea1452906989994d8d27830df754c8117edcd7 (patch) | |
tree | 1b54d055554af5f746669292f818089e264bd0be /src/core.h | |
parent | 9523d7d8fd7840dbc4d94fa3a2bd45e01050612c (diff) |
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.
Diffstat (limited to 'src/core.h')
-rw-r--r-- | src/core.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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, |