Browse Source

ENGINE-957: fix off-by-one bug in the test suite

Make the found array have 4 elements instead of 3.

src/GroupEncryptionTest.cc:2489:18: warning: iteration 3 invokes undefined behavior [-Waggressive-loop-optimizations]
 2489 |         found[i] = false;
      |         ~~~~~~~~~^~~~~~~
src/GroupEncryptionTest.cc:2488:23: note: within this loop
 2488 |     for (int i = 0; i < 4; i++)
      |                     ~~^~~
ENGINE-957
Luca Saiu 1 month ago
parent
commit
f36a23a50d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      test/src/GroupEncryptionTest.cc

+ 1
- 1
test/src/GroupEncryptionTest.cc View File

@ -2358,7 +2358,7 @@ TEST_F(GroupEncryptionTest, check_protocol_group_create_different_own_identity_m
const char* member_addrs[] = {member_1_address, member_2_address, member_3_address, member_4_address};
const char* member_fprs[] = {member_1_fpr, member_2_fpr, member_3_fpr, member_4_fpr};
bool found[] = {false, false, false};
bool found[] = {false, false, false, false};
int count = 0;
for (member_list* curr_member = group1_info->members;


Loading…
Cancel
Save