]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
messages/MOSDPing: fix the inflation amount calculation
authorPiotr Dałek <piotr.dalek@corp.ovh.com>
Fri, 16 Jun 2017 11:10:36 +0000 (13:10 +0200)
committerPiotr Dałek <piotr.dalek@corp.ovh.com>
Fri, 16 Jun 2017 21:00:56 +0000 (21:00 +0000)
commitd959735a7d684018df564573a2ff88092d870fc1
treee2aac44bfcf6d659dea9abba6cb3aee4f7c20706
parent44b7839c788b20e0b9da76bc3838ae10d3ad2f89
messages/MOSDPing: fix the inflation amount calculation

If user specifies a min_message_size small enough (or zero to disable
it altogether), OSDs will crash and burn while trying to allocate
almost 4GB of payload (both min_message_size and payload.length() are
unsigned, so it'll roll over back to 4GB and MAX(4GB, 0) will use 4GB).
If the size of dummy payload is 0, don't bother constructing bufferptr
and bufferlist, then encoding that.

Signed-off-by: Piotr Dałek <piotr.dalek@corp.ovh.com>
src/messages/MOSDPing.h