Skip to content
Snippets Groups Projects
Commit 40288e1e authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Merge remote-tracking branch 'origin/maint-0.2.2'

parents 0c0345a3 bfa75f70
No related branches found
No related tags found
No related merge requests found
o Minor bugfixes:
- Change an integer overflow check in the OpenBSD_Malloc code so
that GCC is less likely to eliminate it as impossible. Patch
from Mansour Moufid. Fixes bug 4059.
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment