evas map: ++Safety for range overflow.
authorHermet Park <hermetpark@gmail.com>
Fri, 3 Jan 2020 11:51:21 +0000 (20:51 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 5 Jan 2020 21:54:53 +0000 (06:54 +0900)
This might fix this issue.

{T8199}

src/lib/evas/common/evas_map_image_internal_high.c

index 3d23782..040bab7 100644 (file)
@@ -391,8 +391,8 @@ _map_triangle_draw_linear(RGBA_Image *src, RGBA_Image *dst,
              if (aa_spans->lines[ay].x[0] > x1) aa_spans->lines[ay].x[0] = x1;
              if (aa_spans->lines[ay].x[1] < x2) aa_spans->lines[ay].x[1] = x2;
           }
-
         if ((x2 - x1) < 1) goto next;
+        if ((x1 >= (cx + cw)) || (x2 <= cx)) goto next;
 
         //Perform subtexel pre-stepping on UV
         dx = 1 - (_xa - x1);