[PATCH] Check for overflow in DroplessArena and return aligned pointer
authorTomasz Miąsko <tomasz.miasko@gmail.com>
Thu, 11 Jun 2020 00:00:00 +0000 (00:00 +0000)
committerXimin Luo <infinity0@debian.org>
Thu, 6 Aug 2020 20:11:39 +0000 (21:11 +0100)
commita2cc8d868adb0c64be5f76985c826922cb269a25
tree4e899287983ab49b899c778c68705eb5af7e9676
parent988f4b013b44c33fce9225e6e4fd5fa00c1fa48e
[PATCH] Check for overflow in DroplessArena and return aligned pointer

* Check for overflow when calculating the slice start & end position.
* Align the pointer obtained from the allocator, ensuring that it
  satisfies user requested alignment (the allocator is only asked for
  layout compatible with u8 slice).
* Remove an incorrect assertion from DroplessArena::align.

Gbp-Pq: Name u-c0c3327ade8b0caa3043425ee45842c86fbd4f76.patch
src/libarena/lib.rs