elki-project / elki

ELKI Data Mining Toolkit
https://elki-project.github.io/
GNU Affero General Public License v3.0
780 stars 321 forks source link

Null Pointer dereference in PAMInitialMeans.java #4

Closed Machiry closed 9 years ago

Machiry commented 9 years ago

There is a NULL Pointer dereference in https://github.com/elki-project/elki/blob/master/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/PAMInitialMeans.java#L151.

This happens when the if condition i.e https://github.com/elki-project/elki/blob/master/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/PAMInitialMeans.java#L155 is never taken.

We have implemented our own distance computation algorithm in which the condition will never be taken.

kno10 commented 9 years ago

Yes, the code assumes there is at least one finite distance value. I will add an error message if this happens. Am 29.07.2015 11:26 nachm. schrieb "Machiry Aravind Kumar" < notifications@github.com>:

There is a NULL Pointer dereference in https://github.com/elki-project/elki/blob/master/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/PAMInitialMeans.java#L151 .

This happens when the if condition i.e https://github.com/elki-project/elki/blob/master/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/PAMInitialMeans.java#L155 is never taken.

We have implemented our own distance computation algorithm in which the condition will never be taken.

— Reply to this email directly or view it on GitHub https://github.com/elki-project/elki/issues/4.

kno10 commented 9 years ago

Should be closed by: b48eb01a7f1a1f6f54718811dfa77a08a868e6e1