mirror of
https://github.com/ceph/ceph
synced 2025-03-08 09:19:03 +00:00
Merge pull request #12653 from wjwithagen/wjw-wip-denc-raw
src/test/test_denc.cc: Fix errors in buffer overflow Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
This commit is contained in:
commit
78736d5410
@ -45,7 +45,7 @@ void test_denc(T v) {
|
||||
// encode
|
||||
bufferlist bl;
|
||||
{
|
||||
auto a = bl.get_contiguous_appender(sizeof(T) * 3);
|
||||
auto a = bl.get_contiguous_appender(s);
|
||||
denc(v, a);
|
||||
}
|
||||
ASSERT_LE(bl.length(), s);
|
||||
@ -82,7 +82,7 @@ void test_denc_featured(T v) {
|
||||
// encode
|
||||
bufferlist bl;
|
||||
{
|
||||
auto a = bl.get_contiguous_appender(sizeof(T) * 3);
|
||||
auto a = bl.get_contiguous_appender(s);
|
||||
denc(v, a, 1);
|
||||
}
|
||||
ASSERT_LE(bl.length(), s);
|
||||
|
Loading…
Reference in New Issue
Block a user