[libmatio] 01/01: Fix a problem in the patch + cosmetic
Sébastien Villemot
sebastien at debian.org
Sat Jan 16 20:42:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastien pushed a commit to annotated tag debian/1.3.4-1
in repository libmatio.
commit fe1999d210cfb3bbd594b84d7590bd844dd5634d
Author: Sylvestre Ledru <sylvestre at debian.org>
Date: Wed Mar 3 09:53:12 2010 +0000
Fix a problem in the patch + cosmetic
---
changelog | 12 +++++++-----
patches/catcherror.diff | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 5 deletions(-)
diff --git a/changelog b/changelog
index 05b8449..0a4e474 100644
--- a/changelog
+++ b/changelog
@@ -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
diff --git a/patches/catcherror.diff b/patches/catcherror.diff
new file mode 100644
index 0000000..560dd5f
--- /dev/null
+++ b/patches/catcherror.diff
@@ -0,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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libmatio.git
More information about the debian-science-commits
mailing list