summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSage Weil <sage@redhat.com>2016-06-23 16:00:01 +0200
committerSage Weil <sage@redhat.com>2016-06-30 18:56:56 +0200
commit98f5fd5e36fbc67bc07bc072c6a7cb1d89374396 (patch)
treee98be09d055adb816a9631ef8a97eb4455d7e9d3 /src
parentunittest_bluefs: don't silence log (diff)
downloadceph-98f5fd5e36fbc67bc07bc072c6a7cb1d89374396.tar.xz
ceph-98f5fd5e36fbc67bc07bc072c6a7cb1d89374396.zip
common/buffer: assert that we do not exceed IOV_MAX in prepare_iov
Signed-off-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/common/buffer.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/buffer.cc b/src/common/buffer.cc
index b75136f9f55..785a210fb96 100644
--- a/src/common/buffer.cc
+++ b/src/common/buffer.cc
@@ -2273,6 +2273,7 @@ int buffer::list::write_fd(int fd, uint64_t offset) const
void buffer::list::prepare_iov(std::vector<iovec> *piov) const
{
+ assert(_buffers.size() <= IOV_MAX);
piov->resize(_buffers.size());
unsigned n = 0;
for (std::list<buffer::ptr>::const_iterator p = _buffers.begin();