Commit 62c1e212 authored by scott's avatar scott
Browse files

Fixed a potential linked list race condition (i.e. accessing freed memory)



* app/crop.c (crop_image): Fixed a potential linked list race
condition (i.e. accessing freed memory) when cropping deletes a
layer.  May fix a bug reported by Sven.

-sg
parent 9c4e6f4a
1999-05-15 Scott Goehring <scott@poverty.bloomington.in.us>
* app/crop.c (crop_image): Fixed a potential linked list race
condition (i.e. accessing freed memory) when cropping deletes a
layer. May fix a bug reported by Sven.
Sat May 15 14:11:46 MEST 1999 Sven Neumann <sven@gimp.org>
* app/clone.c
......
......@@ -863,7 +863,10 @@ crop_image (GImage *gimage,
list = gimage->layers;
while (list)
{
GSList * next;
layer = (Layer *) list->data;
next = g_slist_next (list);
layer_translate (layer, -x1, -y1);
......@@ -888,7 +891,7 @@ crop_image (GImage *gimage,
gimage_remove_layer (gimage, layer);
}
list = g_slist_next (list);
list = next;
}
/* Make sure the projection matches the gimage size */
......
......@@ -863,7 +863,10 @@ crop_image (GImage *gimage,
list = gimage->layers;
while (list)
{
GSList * next;
layer = (Layer *) list->data;
next = g_slist_next (list);
layer_translate (layer, -x1, -y1);
......@@ -888,7 +891,7 @@ crop_image (GImage *gimage,
gimage_remove_layer (gimage, layer);
}
list = g_slist_next (list);
list = next;
}
/* Make sure the projection matches the gimage size */
......
......@@ -863,7 +863,10 @@ crop_image (GImage *gimage,
list = gimage->layers;
while (list)
{
GSList * next;
layer = (Layer *) list->data;
next = g_slist_next (list);
layer_translate (layer, -x1, -y1);
......@@ -888,7 +891,7 @@ crop_image (GImage *gimage,
gimage_remove_layer (gimage, layer);
}
list = g_slist_next (list);
list = next;
}
/* Make sure the projection matches the gimage size */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment