]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librados: cap the rados*{write,append} buffer length 2584/head
authorLoic Dachary <loic-201408@dachary.org>
Sat, 27 Sep 2014 08:37:07 +0000 (10:37 +0200)
committerLoic Dachary <loic-201408@dachary.org>
Sat, 27 Sep 2014 08:48:01 +0000 (10:48 +0200)
commit33501d242661a545211df43bf645398b492398ae
treed8ec1e894ce44851c0b33aad57270a8b16c186ff
parent83fb32ca41c0e4fea00cb72c0c13c24cc935e83b
librados: cap the rados*{write,append} buffer length

When the caller submits a payload that will end up being rejected with

  rados.Error: Ioctx.write(rbd): failed to write hw: errno EMSGSIZE

it is stored in a bufferlist whose length is an unsigned int. If the
value of the len parameter is greater than UINT_MAX/2, rados_write,
rados_write_full and rados_append will fail with E2BIG.

Multiple calls to rados_write or rados_append can fill objects larger
than UINT_MAX/2.

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

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