File pyflag-0.87-pre1-fix-compile-issues.patch of Package pyflag

Index: pyflag-0.87-pre1/src/lib/class.c
===================================================================
--- pyflag-0.87-pre1.orig/src/lib/class.c
+++ pyflag-0.87-pre1/src/lib/class.c
@@ -39,7 +39,7 @@ void *raise_errors(enum _error_type t, c
     va_list ap;
     va_start(ap, reason);
     vsnprintf(_error_buff, ERROR_BUFFER_SIZE-1,reason,ap);
-    _error_buff[ERROR_BUFFER_SIZE]=0;
+    _error_buff[ERROR_BUFFER_SIZE-1]=0;
     va_end(ap);
   };
 
Index: pyflag-0.87-pre1/src/lib/sgzlib.c
===================================================================
--- pyflag-0.87-pre1.orig/src/lib/sgzlib.c
+++ pyflag-0.87-pre1/src/lib/sgzlib.c
@@ -123,7 +123,7 @@ struct sgzip_header *sgzip_default_heade
   header=(struct sgzip_header *)malloc(sizeof(*header));
   if(!header) RAISE(E_IOERROR,NULL,Malloc);
   memcpy(header->magic,magic,sizeof(magic));
-  memcpy(header->x.compression,compression,sizeof(compression));
+  memcpy(header->x.compression,compression,sizeof(header->x.compression));
   header->blocksize=DEFAULT_BLOCKSIZE;
   return header;
 };