src: Check for overflow when resizing AliasedBufferBase
When resizing an AliasedBufferBase
check if the new size will overflow.
Creating a new AliasedBufferBase
the constructor checks if the calculated size in bytes has overflown.
When reserving/resizing an existing buffer, the calculated new size in bytes is not checked if it has overflown.
I would want to write tests for this, but as failing the check will call node::Abort()
I currently do not see how this is possible. I am open for input though.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines