summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-06-26 10:32:57 -0400
committerNick Mathewson <nickm@torproject.org>2017-06-26 10:32:57 -0400
commit82a68be69a696e8aa96203ad00d1f0cda24fee4f (patch)
tree90160d68036a2dab67d05ac701ed2820e1802082
parentacbe16a9a244d9745080ca435cc3587412920caa (diff)
parent0c7c49483f53d8bc3da2d3e9ca62fc9810ccd05a (diff)
downloadtor-82a68be69a696e8aa96203ad00d1f0cda24fee4f.tar.gz
tor-82a68be69a696e8aa96203ad00d1f0cda24fee4f.zip
Merge branch 'maint-0.3.1'
-rw-r--r--src/common/storagedir.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/storagedir.c b/src/common/storagedir.c
index befcfe693f..4405731884 100644
--- a/src/common/storagedir.c
+++ b/src/common/storagedir.c
@@ -210,7 +210,9 @@ storage_dir_read(storage_dir_t *d, const char *fname, int bin, size_t *sz_out)
char *contents = read_file_to_str(path, flags, &st);
if (contents && sz_out) {
// it fits in RAM, so we know its size is less than SIZE_MAX
+#if UINT64_MAX > SIZE_MAX
tor_assert((uint64_t)st.st_size <= SIZE_MAX);
+#endif
*sz_out = (size_t) st.st_size;
}