am 661b2b1b: (-s ours) Add buffer wrap checks and disable throwing of std::bad_alloc.

* commit '661b2b1bdff194b6a872b2d92389b76a365e5061':
  Add buffer wrap checks and disable throwing of std::bad_alloc.