Skip to content

Commit

Permalink
Fix segfault with polyline labels for empty multilinestrings
Browse files Browse the repository at this point in the history
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 b93c142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mapprimitive.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit b93c142

Please sign in to comment.