Commit 714f1b52 authored by Kip Warner's avatar Kip Warner

Fixes Segment fault in Pistache::DynamicStreamBuf::overflow #298

parent 1e116eb0
......@@ -106,7 +106,7 @@ DynamicStreamBuf::overflow(DynamicStreamBuf::int_type ch) {
if (!traits_type::eq_int_type(ch, traits_type::eof())) {
const auto size = data_.size();
if (size < maxSize_) {
reserve(size * 2);
reserve(std::max(size, 1LU) * 2);
*pptr() = ch;
pbump(1);
return traits_type::not_eof(ch);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment