Yossi Gottlieb 3cc673bdd8 Fix wrong zmalloc_size() assumption. (#7963)
When using a system with no malloc_usable_size(), zmalloc_size() assumed
that the heap allocator always returns blocks that are long-padded.

This may not always be the case, and will result with zmalloc_size()
returning a size that is bigger than allocated. At least in one case
this leads to out of bound write, process crash and a potential security
vulnerability.

Effectively this does not affect the vast majority of users, who use
jemalloc or glibc.

This problem along with a (different) fix was reported by Drew DeVault.

(cherry picked from commit 9824fe3e392caa04dc1b4071886e9ac402dd6d95)
2020-10-27 09:12:01 +02:00
..
2020-10-27 09:12:01 +02:00
2019-11-20 20:39:04 -05:00
2020-05-08 10:37:35 +02:00
2020-04-28 11:20:15 +02:00
2020-04-28 11:20:15 +02:00
2020-04-28 11:20:15 +02:00
2019-02-24 21:38:15 +01:00
2020-09-10 14:09:00 +03:00
2019-10-24 14:24:55 +03:00
2020-10-27 09:12:01 +02:00
2020-05-08 10:37:36 +02:00
2020-10-27 09:12:01 +02:00
2019-11-19 17:23:47 +08:00
2020-04-07 16:52:04 +02:00
2019-10-02 11:30:20 +02:00
2020-03-05 12:51:15 +01:00
2020-09-01 09:27:58 +03:00