Skip to content

Commit

Permalink
src/test/test_denc.cc: Fix errors in buffer overflow
Browse files Browse the repository at this point in the history
Signed-off-by: Willem Jan Withagen <[email protected]>
  • Loading branch information
wjwithagen committed Dec 23, 2016
1 parent d73be20 commit cb4950b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/test_denc.cc
Original file line number Diff line number Diff line change
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 cb4950b

Please sign in to comment.