summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--lib/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mem.c b/lib/mem.c
index bcb0a89..92dfed1 100644
--- a/lib/mem.c
+++ b/lib/mem.c
@@ -27,7 +27,7 @@ gray_2nrealloc(void *ptr, size_t *pcount, size_t elsiz)
count += !count;
}
} else {
- if ((size_t)-1 / 2 / elsiz <= count) {
+ if ((size_t)-1 / 3 * 2 / elsiz <= count) {
errno = ENOMEM;
return NULL;
}

Return to:

Send suggestions and report system problems to the System administrator.