Index: /branches/eam_branches/ipp-20150625/Ohana/src/libfits/matrix/F_compress_data.c
===================================================================
--- /branches/eam_branches/ipp-20150625/Ohana/src/libfits/matrix/F_compress_data.c	(revision 38665)
+++ /branches/eam_branches/ipp-20150625/Ohana/src/libfits/matrix/F_compress_data.c	(revision 38666)
@@ -119,4 +119,8 @@
       return (FALSE);
     }
+    if (Nout > *Nzdata) {
+      fprintf (stderr, "buffer overrun! %d out, %d available\n", Nout, *Nzdata);
+      return FALSE;
+    }
     *Nzdata = Nout;
     return TRUE;
Index: /branches/eam_branches/ipp-20150625/Ohana/src/libfits/table/F_compress_T.c
===================================================================
--- /branches/eam_branches/ipp-20150625/Ohana/src/libfits/table/F_compress_T.c	(revision 38665)
+++ /branches/eam_branches/ipp-20150625/Ohana/src/libfits/table/F_compress_T.c	(revision 38666)
@@ -211,5 +211,5 @@
 
   // allocate the intermediate storage buffers
-  int Nzdata_alloc = max_width*ztilelen + 100;
+  int Nzdata_alloc = 2*max_width*ztilelen + 100;
   ALLOCATE (raw,   char, max_width*ztilelen);
   ALLOCATE (zdata, char, Nzdata_alloc);
@@ -223,4 +223,6 @@
   gettimeofday (&startTimer, (void *) NULL);
 
+  // ohana_memcheck (TRUE);
+
   // compress the data : copy into a tile, compress the tile, then add to the output table
   // each tile -> 1 row of the output table
@@ -243,4 +245,6 @@
       }
       
+      // ohana_memcheck (TRUE);
+
       // XXX TIMER 2a
       gettimeofday (&stopTimer, (void *) NULL); 
@@ -260,4 +264,5 @@
       }
 
+      // ohana_memcheck (TRUE);
       // optname, optvalue = NULL, Noptions = 0
       
