diff options
Diffstat (limited to 'src/common/OpenBSD_malloc_Linux.c')
-rw-r--r-- | src/common/OpenBSD_malloc_Linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/OpenBSD_malloc_Linux.c b/src/common/OpenBSD_malloc_Linux.c index 19dac77657..445135c6bb 100644 --- a/src/common/OpenBSD_malloc_Linux.c +++ b/src/common/OpenBSD_malloc_Linux.c @@ -1236,7 +1236,7 @@ imalloc(size_t size) ptralloc = 1; size = malloc_pagesize; } - if ((size + malloc_pagesize) < size) { /* Check for overflow */ + if (size > SIZE_MAX - malloc_pagesize) { /* Check for overflow */ result = NULL; errno = ENOMEM; } else if (size <= malloc_maxsize) |