if `buf_->size == 0`, `(*buf_)[0]` is undefined, so this was to be fixed.