edje: Fix memory overflow on svg loader.
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 13 Sep 2016 08:49:36 +0000 (17:49 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 13 Sep 2016 08:49:36 +0000 (17:49 +0900)
Initialize temporary index not to cause memory overflow on svg loader.

src/bin/edje/edje_svg_loader.c

index 63aa4ef..1b23913 100644 (file)
@@ -1114,6 +1114,7 @@ _attr_parse_polygon_points(const char *str, double **points, int *point_count)
              point_array = realloc(point_array, (count + tmp_count) * sizeof(double));
              memcpy(&point_array[count], tmp, tmp_count * sizeof(double));
              count += tmp_count;
+             tmp_count = 0;
           }
      }