--- gimp-2.6.6/plug-ins/common/file-png.c	2008-09-25 20:00:53.000000000 +0200
+++ plug-ins/common/file-png.c	2009-07-21 12:46:48.000000000 +0200
@@ -880,15 +880,22 @@ load_image (const gchar  *filename,
     {
       gint offset_x = png_get_x_offset_pixels (pp, info);
       gint offset_y = png_get_y_offset_pixels (pp, info);
+      gint image_width = offset_x + info->width;
+      gint image_height = offset_y + info->height;
 
       gimp_layer_set_offsets (layer, offset_x, offset_y);
 
-      if ((abs (offset_x) > info->width) || (abs (offset_y) > info->height))
+      if ((image_width <= 0) || (image_height <= 0))
         {
           if (interactive)
             g_message (_("The PNG file specifies an offset that caused "
                          "the layer to be positioned outside the image."));
         }
+
+      gimp_image_resize (image, 
+                         MAX(1, image_width), 
+                         MAX(1, image_height), 
+                         0, 0);
     }
 
   if (png_get_valid (pp, info, PNG_INFO_pHYs))
