summaryrefslogtreecommitdiff
path: root/lib/xalloc.h
diff options
context:
space:
mode:
authorClint Adams <clint@debian.org>2018-07-04 13:05:31 -0400
committerClint Adams <clint@debian.org>2018-07-04 13:05:31 -0400
commit117dcd10d7e04d0dda7668518b8d085027f4d705 (patch)
treef9612d6268ab16555fb21be04bc7594f9eb6ce4f /lib/xalloc.h
parent1c0d840cad3dc7c951a86c9c128a721e9ebcd2cf (diff)
New upstream version 4.5
Diffstat (limited to 'lib/xalloc.h')
-rw-r--r--lib/xalloc.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/xalloc.h b/lib/xalloc.h
index 484b67f..2a51b84 100644
--- a/lib/xalloc.h
+++ b/lib/xalloc.h
@@ -1,6 +1,6 @@
/* xalloc.h -- malloc with out-of-memory checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2017 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2018 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef XALLOC_H_
#define XALLOC_H_
@@ -194,6 +194,8 @@ x2nrealloc (void *p, size_t *pn, size_t s)
n = DEFAULT_MXFAST / s;
n += !n;
}
+ if (xalloc_oversized (n, s))
+ xalloc_die ();
}
else
{