summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2018-09-01 06:09:21 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2018-09-01 06:09:21 (GMT)
commit96631a9a897cfc624410be9202e705282e0ea50f (patch) (side-by-side diff)
treefd85b07ff4c2c284df7920752a37717b1b007d39
parent84fcfeb07c3c785e818b5a13452b76f2055457a0 (diff)
downloadpam-modules-master.tar.gz
pam-modules-master.tar.bz2
* lib/mem.c (gray_2nrealloc): Add missing multiplier.
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.