]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librados: cap the IoCtxImpl::{aio_}*{write,append} buffer length 2590/head
authorLoic Dachary <loic-201408@dachary.org>
Sun, 28 Sep 2014 22:39:50 +0000 (00:39 +0200)
committerLoic Dachary <loic-201408@dachary.org>
Mon, 29 Sep 2014 06:35:54 +0000 (08:35 +0200)
commit5d1d9dba60bf9752e9de6351b8d92c32abbc14c9
treee27a75b08acb9940caffc24dc8e48c9743c69b8d
parentbecc1140ac1cc12d811fd4895ebe6d4cf00357f8
librados: cap the IoCtxImpl::{aio_}*{write,append} buffer length

If the value of the len parameter is greater than UINT_MAX/2,
IoCtxImpl::aio_write, IoCtxImpl::aio_write_full, IoCtxImpl::aio_append,
IoCtxImpl::write, IoCtxImpl::append will fail with E2BIG.

IoCtxImpl::write_full is the exception because it does not have a
length argument to check.

For more information see 33501d242661a545211df43bf645398b492398ae

http://tracker.ceph.com/issues/9592 Fixes: #9592

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
src/librados/IoCtxImpl.cc
src/test/librados/aio.cc
src/test/librados/io.cc