Commit c3a2105c authored by Jelte Jansen's avatar Jelte Jansen Committed by JINMEI Tatuya
Browse files

[2275] valgrind fix: initialize memory in labelsequence test

parent 347e333b
......@@ -861,7 +861,11 @@ TEST_F(LabelSequenceTest, badDeserialize) {
EXPECT_THROW(LabelSequence ls(toomany_offsets), isc::BadValue);
// exceed MAX_LABEL_LEN
const uint8_t offsets_toolonglabel[] = { 2, 0, 64 };
uint8_t offsets_toolonglabel[LabelSequence::MAX_SERIALIZED_LENGTH];
memset(&offsets_toolonglabel, 0, LabelSequence::MAX_SERIALIZED_LENGTH);
offsets_toolonglabel[0] = 2;
offsets_toolonglabel[1] = 0;
offsets_toolonglabel[2] = 64;
EXPECT_THROW(LabelSequence ls(offsets_toolonglabel), isc::BadValue);
// Inconsistent data: an offset is lower than the previous offset
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment