Skip to content

Commit

Permalink
Merge pull request #12653 from wjwithagen/wjw-wip-denc-raw
Browse files Browse the repository at this point in the history
src/test/test_denc.cc: Fix errors in buffer overflow

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
  • Loading branch information
liewegas committed Dec 24, 2016
2 parents 7bbb79a + cb4950b commit 78736d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/test_denc.cc
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 78736d5

Please sign in to comment.