mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-20 13:06:20 +02:00
Merge remote-tracking branch 'origin/maint-0.2.2'
This commit is contained in:
commit
40288e1e66
5
changes/bug4059
Normal file
5
changes/bug4059
Normal file
@ -0,0 +1,5 @@
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user