Open asanakoy opened 6 years ago
In line tsne.cpp#L37 vectors indices and distances will have < K + 1 elements if K > N - 1. This will cause erroneous reads out of the bounds of the vector in tsne.cpp#L388 and other loops.
indices
distances
< K + 1
K > N - 1
There should be a check that K <= N -1.
K <= N -1
Hi Artsiom, thanks for reporting. Can you please submit a pull request?
In line tsne.cpp#L37 vectors
indices
anddistances
will have< K + 1
elements ifK > N - 1
.This will cause erroneous reads out of the bounds of the vector in tsne.cpp#L388 and other loops.
There should be a check that
K <= N -1
.