diff options
author | Renato Botelho <renato@netgate.com> | 2015-10-13 13:45:58 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-10-13 13:45:58 -0300 |
commit | e52aa5f667faebee85874ec39c29fa1257dd554f (patch) | |
tree | b08cff1a8d0fb8f667942aca5b9a8be9fb5dca03 /contrib/libcxxrt/exception.cc | |
parent | 945ed01c4bae06169f63978e43029c04d4abd731 (diff) | |
parent | 8096b85f202b18e1be6a5dd5251a10fcdb255a78 (diff) | |
download | FreeBSD-src-e52aa5f667faebee85874ec39c29fa1257dd554f.zip FreeBSD-src-e52aa5f667faebee85874ec39c29fa1257dd554f.tar.gz |
Merge branch 'stable/10' into devel
Diffstat (limited to 'contrib/libcxxrt/exception.cc')
-rw-r--r-- | contrib/libcxxrt/exception.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index e428773..c559f97 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -516,7 +516,7 @@ static void emergency_malloc_free(char *ptr) break; } } - assert(buffer > 0 && + assert(buffer >= 0 && "Trying to free something that is not an emergency buffer!"); // emergency_malloc() is expected to return 0-initialized data. We don't // zero the buffer when allocating it, because the static buffers will @@ -556,7 +556,7 @@ static void free_exception(char *e) { // If this allocation is within the address range of the emergency buffer, // don't call free() because it was not allocated with malloc() - if ((e > emergency_buffer) && + if ((e >= emergency_buffer) && (e < (emergency_buffer + sizeof(emergency_buffer)))) { emergency_malloc_free(e); |