summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/basic/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index c18ac39e03..588eacd77c 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -271,7 +271,7 @@ int read_full_stream(FILE *f, char **contents, size_t *size) {
if (n >= READ_FULL_BYTES_MAX)
return -E2BIG;
- n = MAX(n * 2, READ_FULL_BYTES_MAX);
+ n = MIN(n * 2, READ_FULL_BYTES_MAX);
}
buf[l] = 0;