Permalink
Browse files

Fix segfault with polyline labels for empty multilinestrings

longest_line_index can point outside pll->ll if shape only contains
lines with <2 points.
  • Loading branch information...
olt committed Feb 8, 2018
1 parent bba2982 commit b93c142da429eb1bb9e823e27e005c9a3a999e4b
Showing with 1 addition and 1 deletion.
  1. +1 −1 mapprimitive.c
@@ -1552,7 +1552,7 @@ void msPolylineComputeLineSegments(shapeObj *shape, struct polyline_lengths *pll
pll->ll = msSmallMalloc(shape->numlines * sizeof(struct line_lengths));
pll->total_length = 0;
pll->longest_line_index = 0;
for(i=0; i<shape->numlines; i++) {

0 comments on commit b93c142

Please sign in to comment.