summaryrefslogtreecommitdiff
path: root/src/static_libs
diff options
context:
space:
mode:
authorHermet Park <hermet@hermet.pe.kr>2016-12-06 19:18:09 +0900
committerHermet Park <hermet@hermet.pe.kr>2016-12-06 19:19:20 +0900
commit8be045612bc4901ba5322ae589796b23867fc4a4 (patch)
treeaf042b3f1d26172398e1f67caa3e7b7dd9cd76e5 /src/static_libs
parent10fb982ac01874fa273d67a91aa4e852485b86f1 (diff)
static_libs triangulator: prevent null pointer(ptr) access.
Diffstat (limited to 'src/static_libs')
-rw-r--r--src/static_libs/triangulator/triangulator_stroker.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/static_libs/triangulator/triangulator_stroker.c b/src/static_libs/triangulator/triangulator_stroker.c
index 44f7b89..18f7ead 100644
--- a/src/static_libs/triangulator/triangulator_stroker.c
+++ b/src/static_libs/triangulator/triangulator_stroker.c
@@ -156,23 +156,23 @@ move_to(Triangulator_Stroker *stroker, const double *pts)
156 ptr1 = eina_inarray_nth(stroker->arc_pts, 0); 156 ptr1 = eina_inarray_nth(stroker->arc_pts, 0);
157 ptr = eina_inarray_nth(stroker->vertices, 0); 157 ptr = eina_inarray_nth(stroker->vertices, 0);
158 i = pts_count; 158 i = pts_count;
159 }
160 while (front != end)
161 {
162 ptr[--i] = ptr1[2 * end - 1];
163 ptr[--i] = ptr1[2 * end - 2];
164 --end;
165 if (front == end)
166 break;
167 ptr[--i] = ptr1[2 * front + 1];
168 ptr[--i] = ptr1[2 * front + 0];
169 ++front;
170 }
171 159
172 if (jump) 160 while (front != end)
173 { 161 {
174 ptr[i - 1] = ptr[i + 1]; 162 ptr[--i] = ptr1[2 * end - 1];
175 ptr[i - 2] = ptr[i + 0]; 163 ptr[--i] = ptr1[2 * end - 2];
164 --end;
165 if (front == end)
166 break;
167 ptr[--i] = ptr1[2 * front + 1];
168 ptr[--i] = ptr1[2 * front + 0];
169 ++front;
170 }
171 if (jump)
172 {
173 ptr[i - 1] = ptr[i + 1];
174 ptr[i - 2] = ptr[i + 0];
175 }
176 } 176 }
177 break; 177 break;
178 } 178 }