[gegl] Fix overshoot in gegl_buffer_copy



commit aac9e9719d5a6be8fe22352448098d8380805a23
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Tue Apr 9 14:15:26 2013 -0700

    Fix overshoot in gegl_buffer_copy
    
    Don't attempt to COW copy a rect smaller than a tile,
    doing so will cause cow.y to get pushed outside of
    the original rect and copy more than it's supposed to.

 gegl/buffer/gegl-buffer-access.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index a690a6a..a0dc9f5 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -1740,6 +1740,8 @@ gegl_buffer_copy (GeglBuffer          *src,
 
 
   if (src->soft_format == dst->soft_format &&
+      src_rect->width >= src->tile_width &&
+      src_rect->height >= src->tile_height &&
       src->tile_width == dst->tile_width  &&
       src->tile_height == dst->tile_height &&
       !g_object_get_data (G_OBJECT (dst), "is-linear") &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]