r36250 - in /packages/libmatio/trunk/debian: changelog patches/catcherror.diff
sylvestre at users.alioth.debian.org
sylvestre at users.alioth.debian.org
Wed Mar 3 09:53:14 UTC 2010
Author: sylvestre
Date: Wed Mar 3 09:53:12 2010
New Revision: 36250
URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=36250
Log:
Fix a problem in the patch + cosmetic
Added:
packages/libmatio/trunk/debian/patches/catcherror.diff
Modified:
packages/libmatio/trunk/debian/changelog
Modified: packages/libmatio/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debian-science/packages/libmatio/trunk/debian/changelog?rev=36250&op=diff
==============================================================================
--- packages/libmatio/trunk/debian/changelog (original)
+++ packages/libmatio/trunk/debian/changelog Wed Mar 3 09:53:12 2010
@@ -1,12 +1,14 @@
-libmatio (1.3.3-7) UNRELEASED; urgency=low
+libmatio (1.3.3-7) unstable; urgency=low
* Uses ghostscript-x instead of gs-gpl
- * Fix a compression read size issues. Thanks to Vincent Couvert from Scilab
- for the patch read-size-issue.diff (Closes: #556652)
- * Fix a bug in the sparse complex matrices handling. Patch
+
+ [ Vincent Couvert from Scilab ]
+ * Fix a compression read size issues. read-size-issue.diff (Closes: #556652)
+ * Fix a bug in the sparse complex matrices handling.
sparsecomplexmatrices.diff
+ * Improves feedback when cannot read a mat file. catcherror.diff
- -- Sylvestre Ledru <sylvestre at debian.org> Mon, 01 Mar 2010 23:20:07 +0100
+ -- Sylvestre Ledru <sylvestre at debian.org> Wed, 03 Mar 2010 10:35:05 +0100
libmatio (1.3.3-6) unstable; urgency=low
Added: packages/libmatio/trunk/debian/patches/catcherror.diff
URL: http://svn.debian.org/wsvn/debian-science/packages/libmatio/trunk/debian/patches/catcherror.diff?rev=36250&op=file
==============================================================================
--- packages/libmatio/trunk/debian/patches/catcherror.diff (added)
+++ packages/libmatio/trunk/debian/patches/catcherror.diff Wed Mar 3 09:53:12 2010
@@ -1,0 +1,41 @@
+Index: matio-1.3.3/src/mat.c
+===================================================================
+--- matio-1.3.3.orig/src/mat.c 2010-03-02 17:37:43.000000000 +0100
++++ matio-1.3.3/src/mat.c 2010-03-02 17:37:47.000000000 +0100
+@@ -1811,7 +1811,7 @@
+ /* Read position so we can reset the file position if an error occurs */
+ fpos = ftell(mat->fp);
+ matvar = Mat_VarReadNextInfo(mat);
+- if ( matvar )
++ if ( matvar != NULL)
+ ReadData(mat,matvar);
+ else
+ fseek(mat->fp,fpos,SEEK_SET);
+Index: matio-1.3.3/src/mat5.c
+===================================================================
+--- matio-1.3.3.orig/src/mat5.c 2010-03-02 17:37:43.000000000 +0100
++++ matio-1.3.3/src/mat5.c 2010-03-02 17:37:47.000000000 +0100
+@@ -1354,6 +1354,7 @@
+ Mat_Critical("cells[%d], Uncompressed type not MAT_T_MATRIX",i);
+ Mat_VarFree(cells[i]);
+ cells[i] = NULL;
++ return -1;
+ }
+ cells[i]->compression = 1;
+ bytesread += InflateArrayFlags(mat,matvar,uncomp_buf);
+@@ -6965,8 +6966,13 @@
+ }
+ if ( matvar->class_type == MAT_C_STRUCT )
+ ReadNextStructField(mat,matvar);
+- else if ( matvar->class_type == MAT_C_CELL )
+- ReadNextCell(mat,matvar);
++ else if ( matvar->class_type == MAT_C_CELL ) {
++ if (ReadNextCell(mat,matvar) == -1) {
++ Mat_VarFree(matvar);
++ matvar = NULL;
++ return NULL;
++ }
++ }
+ fseek(mat->fp,-(int)matvar->z->avail_in,SEEK_CUR);
+ matvar->datapos = ftell(mat->fp);
+ fseek(mat->fp,nBytes+8+fpos,SEEK_SET);
More information about the debian-science-commits
mailing list