Itseez/opencv — pull request #987 by jet47 (2013-06-13 06:24:27+00:00)
Title: Fix for Bug #3085

http://code.opencv.org/issues/3085

`weights` array is only allocated for `l_count+1` elements,
but then `weights[l_count+1]` element is accessed.