diff -ru pan-0.132/pan/gui/body-pane.cc pan-0.132.hacked/pan/gui/body-pane.cc
--- pan-0.132/pan/gui/body-pane.cc	2007-08-01 12:00:00.000000000 -0500
+++ pan-0.132.hacked/pan/gui/body-pane.cc	2007-10-09 00:30:43.000000000 -0500
@@ -815,8 +815,15 @@
       GMimeStream * mem_stream (g_mime_stream_mem_new ());
       g_mime_data_wrapper_write_to_stream (wrapper, mem_stream);
       GByteArray * buffer (GMIME_STREAM_MEM(mem_stream)->buffer);
-      if (buffer->len)
-          gdk_pixbuf_loader_write (l, (guchar*)buffer->data, buffer->len, &err);
+      size_t c = 0;
+      size_t left = buffer->len;
+      while (left > 0)
+      {
+        size_t len = left < 1024 ? left : 1024; /* KLUDGE magic number */
+        gdk_pixbuf_loader_write (l, ((guchar*)buffer->data) + c, len, &err);
+        left -= len;
+        c += len;
+      }
       g_object_unref (mem_stream);
       g_object_unref (wrapper);
     }
