-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Description
Hello!
There is a bug in Consensus.cpp. At line 129 you create an object of type cluster_result as follows:
cluster_result Z(N-1);
Now when there is only one point in the vector 'points' the expressoin N-1 is 0, and the array inside object Z, (which is also named Z) is initialized with length 0.
Later in Consensus.cpp at line 145
MST_linkage_core(N,D,Z)
is called, and inside this function
Z2.append(0, idx2, min);
is called, where Z2 is the parameter Z.
Z2.append() then accesses Z[pos] with pos=0 (and smashes the stack for me), since the array has a length of 0 dereferencing it leads to undefined behaviour.
Using cluster_result Z(N); fixed it for me.
Best regards,
Christian
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels