This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch jessie
in repository freexl.

commit 39e5a6253942a23351c301635c8892a72124e9ba
Author: Bas Couwenberg <sebas...@xs4all.nl>
Date:   Wed Jul 15 22:11:54 2015 +0200

    Add patch to fix 32 bit multiplication overflow.
---
 debian/changelog                                   |  6 ++++
 debian/patches/32bit-multiplication-overflow.patch | 38 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 45 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index dc83019..fd823a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+freexl (1.0.0g-1+deb8u2) UNRELEASED; urgency=medium
+
+  * Add patch to fix 32 bit multiplication overflow.
+
+ -- Bas Couwenberg <sebas...@debian.org>  Wed, 15 Jul 2015 22:11:02 +0200
+
 freexl (1.0.0g-1+deb8u1) unstable; urgency=high
 
   * Update my email to @debian.org address. 
diff --git a/debian/patches/32bit-multiplication-overflow.patch 
b/debian/patches/32bit-multiplication-overflow.patch
new file mode 100644
index 0000000..f4e1d65
--- /dev/null
+++ b/debian/patches/32bit-multiplication-overflow.patch
@@ -0,0 +1,38 @@
+Description: Fixing a critical bug (32 bit multiplication overflow) reported 
by RHEL maintainers
+Origin: 
https://www.gaia-gis.it/fossil/freexl/fdiff?v1=4f9408c216ead322&v2=44802d385bc32499&sbs=1
+Author: Alessandro Furieri <a.furi...@lqt.it>
+
+--- a/src/freexl.c
++++ b/src/freexl.c
+@@ -1066,6 +1066,7 @@ allocate_cells (biff_workbook * workbook
+ /* allocating the rows and cells for the active Worksheet */
+     unsigned int row;
+     unsigned int col;
++    double dsize;
+     biff_cell_value *p_cell;
+ 
+     if (workbook == NULL)
+@@ -1073,6 +1074,14 @@ allocate_cells (biff_workbook * workbook
+     if (workbook->active_sheet == NULL) 
+         return FREEXL_NULL_ARGUMENT;
+ 
++/* testing for an unrealistically high memory size > 256MB */
++    dsize =
++      (double) sizeof (biff_cell_value) *
++      (double) (workbook->active_sheet->rows) *
++      (double) (workbook->active_sheet->columns);
++    if (dsize > 256.0 * 1024.0 * 1024.0)
++      return FREEXL_INSUFFICIENT_MEMORY;
++
+ /* allocating the cell values array */
+     workbook->active_sheet->cell_values =
+       malloc (sizeof (biff_cell_value) *
+@@ -1725,6 +1734,8 @@ parse_SST (biff_workbook * workbook, int
+             }
+         workbook->shared_strings.utf8_strings =
+             malloc (sizeof (char **) * workbook->shared_strings.string_count);
++        if (workbook->shared_strings.utf8_strings == NULL)
++            return FREEXL_INSUFFICIENT_MEMORY;
+         for (i_string = 0; i_string < workbook->shared_strings.string_count;
+              i_string++)
+             *(workbook->shared_strings.utf8_strings + i_string) = NULL;
diff --git a/debian/patches/series b/debian/patches/series
index 079be2f..7fa2afa 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 afl-vulnerabilitities.patch
+32bit-multiplication-overflow.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-grass/freexl.git

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to