ceph/ceph — pull request #63 by dachary (2013-02-15 23:36:16+00:00)
Title: fix operator>= and operator> (bufferlist& l, bufferlist& r)

bufferlist a;
a.append("A");
bufferlist ab;
ab.append("AB");

a >= ab failed, throwing an instance of 'ceph::buffer::end_of_buffer'
because it tried to access a[1]. Instead of testing for the length of
the buffers within the loop, they are compared before entering the loop.

A set of unit tests demonstrating the problem and covering all comparison
operators are added to show that the proposed fix works as expected.

http://tracker.ceph.com/issues/4157 refs #4157

Signed-off-by: Loic Dachary