summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-09-08 17:26:20 +0200
committertiptorrent development team <tiptorrent@soleta.eu>2021-09-29 15:47:58 +0200
commita3ea1452906989994d8d27830df754c8117edcd7 (patch)
tree1b54d055554af5f746669292f818089e264bd0be
parent9523d7d8fd7840dbc4d94fa3a2bd45e01050612c (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.
-rw-r--r--src/core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core.h b/src/core.h
index 524dd62..d39eda4 100644
--- a/src/core.h
+++ b/src/core.h
@@ -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,