We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c056026 commit 349c133Copy full SHA for 349c133
test/msgpack_vref.cpp
@@ -267,11 +267,11 @@ TEST(MSGPACK, vrefbuffer_small_int64)
267
268
TEST(MSGPACK, vref_buffer_overflow)
269
{
270
- size_t ref_size = 0;
+ size_t ref_size = 0;
271
size_t chunk_size = std::numeric_limits<size_t>::max();
272
- char *buf = (char *)malloc(chunk_size);
+ char *buf = (char *)malloc(0x1000);
273
ASSERT_THROW(msgpack::vrefbuffer vbuf(ref_size, chunk_size), std::bad_alloc);
274
-// msgpack::vrefbuffer vbuf2(0, 0x1000);
275
-// ASSERT_THROW(vbuf2.append_copy(buf, chunk_size), std::bad_alloc);
+ msgpack::vrefbuffer vbuf2(0, 0x1000);
+ ASSERT_THROW(vbuf2.append_copy(buf, chunk_size), std::bad_alloc);
276
free(buf);
277
}
0 commit comments