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