[libmatio] 24/48: * 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 sparsecomplexmatrices.diff
Sébastien Villemot
sebastien at debian.org
Fri Jan 15 16:48:22 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastien pushed a commit to branch master
in repository libmatio.
commit ce80b27fc5dbff9bb01b749ca91670b950ce7bda
Author: Sylvestre Ledru <sylvestre at debian.org>
Date: Tue Mar 2 06:23:03 2010 +0000
* 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
sparsecomplexmatrices.diff
---
debian/changelog | 6 +++-
debian/patches/read-size-issue.diff | 53 +++++++++++++++++++++++++++++++
debian/patches/sparsecomplexmatrices.diff | 13 ++++++++
debian/rules | 1 +
4 files changed, 72 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 9fafb2d..05b8449 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
libmatio (1.3.3-7) UNRELEASED; 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
+ sparsecomplexmatrices.diff
- -- Sylvestre Ledru <sylvestre at debian.org> Sun, 14 Feb 2010 18:02:51 +0100
+ -- Sylvestre Ledru <sylvestre at debian.org> Mon, 01 Mar 2010 23:20:07 +0100
libmatio (1.3.3-6) unstable; urgency=low
diff --git a/debian/patches/read-size-issue.diff b/debian/patches/read-size-issue.diff
new file mode 100644
index 0000000..c3258d4
--- /dev/null
+++ b/debian/patches/read-size-issue.diff
@@ -0,0 +1,53 @@
+--- libmatio-1.3.3.orig/src/mat5.c 2010-03-01 23:11:21.000000000 +0100
++++ libmatio-1.3.3/src/mat5.c 2010-03-01 23:15:06.000000000 +0100
+@@ -129,8 +129,15 @@
+ nBytes += tag_size + sparse->ndata*Mat_SizeOf(matvar->data_type);
+ } else {
+ nBytes += tag_size + nmemb*Mat_SizeOf(matvar->data_type);
+- if ( matvar->isComplex )
++ if (nmemb*Mat_SizeOf(matvar->data_type) % 8) {
++ nBytes += (8 - (nmemb*Mat_SizeOf(matvar->data_type) % 8));
++ }
++ if ( matvar->isComplex ) {
+ nBytes += tag_size + nmemb*Mat_SizeOf(matvar->data_type);
++ if (nmemb*Mat_SizeOf(matvar->data_type) % 8) {
++ nBytes += (8 - (nmemb*Mat_SizeOf(matvar->data_type) % 8));
++ }
++ }
+ }
+
+ return nBytes;
+@@ -218,8 +225,15 @@
+ nBytes += tag_size + sparse->ndata*Mat_SizeOf(matvar->data_type);
+ } else {
+ nBytes += tag_size + nmemb*Mat_SizeOf(matvar->data_type);
+- if ( matvar->isComplex )
++ if ( nmemb*Mat_SizeOf(matvar->data_type) % 8 ) {
++ nBytes += (8 - (nmemb*Mat_SizeOf(matvar->data_type) % 8));
++ }
++ if ( matvar->isComplex ) {
+ nBytes += tag_size + nmemb*Mat_SizeOf(matvar->data_type);
++ if ( nmemb*Mat_SizeOf(matvar->data_type) % 8 ) {
++ nBytes += (8 - (nmemb*Mat_SizeOf(matvar->data_type) % 8));
++ }
++ }
+ }
+
+ return nBytes;
+@@ -305,8 +319,15 @@
+ nBytes += tag_size + sparse->ndata*Mat_SizeOf(matvar->data_type);
+ } else {
+ nBytes += tag_size + nmemb*Mat_SizeOf(matvar->data_type);
+- if ( matvar->isComplex )
++ if ( nmemb*Mat_SizeOf(matvar->data_type) % 8 ) {
++ nBytes += (8 - (nmemb*Mat_SizeOf(matvar->data_type) % 8));
++ }
++ if ( matvar->isComplex ) {
+ nBytes += tag_size + nmemb*Mat_SizeOf(matvar->data_type);
++ if ( nmemb*Mat_SizeOf(matvar->data_type) % 8 ) {
++ nBytes += (8 - (nmemb*Mat_SizeOf(matvar->data_type) % 8));
++ }
++ }
+ }
+
+ return nBytes;
diff --git a/debian/patches/sparsecomplexmatrices.diff b/debian/patches/sparsecomplexmatrices.diff
new file mode 100644
index 0000000..0e9a6bc
--- /dev/null
+++ b/debian/patches/sparsecomplexmatrices.diff
@@ -0,0 +1,13 @@
+--- libmatio-1.3.3.orig/src/mat5.c 2010-03-01 23:11:21.000000000 +0100
++++ libmatio-1.3.3/src/mat5.c 2010-03-01 23:15:06.000000000 +0100
+@@ -4793,8 +4814,8 @@
+ Mat_SizeOf(matvar->data_type));
+ complex_data->Im = malloc(data->ndata*
+ Mat_SizeOf(matvar->data_type));
+- if ( NULL == complex_data || NULL == complex_data->Re ||
+- NULL == complex_data->Im ) {
++ if ( NULL != complex_data && NULL != complex_data->Re &&
++ NULL != complex_data->Im ) {
+ if ( matvar->compression == COMPRESSION_NONE) {
+ #if defined(EXTENDED_SPARSE)
+ switch ( matvar->data_type ) {
diff --git a/debian/rules b/debian/rules
index 8db7cb3..15a4ba6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,7 @@
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
DEB_CONFIGURE_NORMAL_ARGS += --enable-shared
DEB_MAKE_BUILD_TARGET := libmatio_la_LIBADD=-lz
--
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