aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 15e08fa898..73df89267c 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1324,7 +1324,7 @@ read_file_to_str(const char *filename, int bin, size_t *size_out)
return NULL;
}
- if (statbuf.st_size+1 > SIZE_T_MAX)
+ if ((uint64_t)(statbuf.st_size)+1 > SIZE_T_MAX)
return NULL;
string = tor_malloc((size_t)(statbuf.st_size+1));