[gnumeric] Fuzzed file fixes. [#751922]



commit 7b02d793e1535bb1f46c510e747d2f47400d589b
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Sat Jul 4 18:55:35 2015 -0600

    Fuzzed file fixes.  [#751922]
    
    2015-07-04  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * src/value.c (value_compare_real): handle two empty values however
        they appear

 ChangeLog   |    5 +++++
 NEWS        |    2 +-
 src/value.c |    4 +++-
 3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c16262c..8b7ea3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-04  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * src/value.c (value_compare_real): handle two empty values however
+       they appear
+
 2015-07-03  Morten Welinder  <terra gnome org>
 
        * src/func-builtin.c (gnumeric_table): Return #REF! outside array
diff --git a/NEWS b/NEWS
index 6e025a5..139532d 100644
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,7 @@ Andreas:
        * Improve function import to ODF. [#750627]
        * Add CONFIDENCE.T, MODE.MULT, PERCENTILE.EXC, PERCENTRANK.EXC
          and QUARTILE.EXC.
-       * Fuzzed file fixes.  [#751060] [#751501] [#751907]
+       * Fuzzed file fixes.  [#751060] [#751501] [#751851] [#751922]
        * Fix ODF import of named expressions. [#750627]
        * Import reference unions from ODF. [#750627]
        * Improve CONVERT function.
diff --git a/src/value.c b/src/value.c
index 31ebd0e..9499a50 100644
--- a/src/value.c
+++ b/src/value.c
@@ -1360,7 +1360,9 @@ value_compare_real (GnmValue const *a, GnmValue const *b,
 
        switch (PAIR (ta,tb)) {
        case CPAIR (VALUE_EMPTY,VALUE_EMPTY):
-               g_assert_not_reached(); /* Should have hit trivial case.  */
+               /* In most cases this is handled by the trivial case. */
+               /* We can get here if one of a and b is NULL and the  */
+               /* is not but contains an empty value.                */
                return IS_EQUAL;
 
        /* ---------------------------------------- */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]