gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r1017 - Extractor/src/plugins/ole2


From: grothoff
Subject: [GNUnet-SVN] r1017 - Extractor/src/plugins/ole2
Date: Sat, 25 Jun 2005 15:17:05 -0700 (PDT)

Author: grothoff
Date: 2005-06-25 15:17:01 -0700 (Sat, 25 Jun 2005)
New Revision: 1017

Modified:
   Extractor/src/plugins/ole2/gsf-infile-msole.c
   Extractor/src/plugins/ole2/gsf-utils.h
Log:
fixing bug reported to debian (parser error-assertion failure reported, should 
be ignored in LE)

Modified: Extractor/src/plugins/ole2/gsf-infile-msole.c
===================================================================
--- Extractor/src/plugins/ole2/gsf-infile-msole.c       2005-06-25 21:41:49 UTC 
(rev 1016)
+++ Extractor/src/plugins/ole2/gsf-infile-msole.c       2005-06-25 22:17:01 UTC 
(rev 1017)
@@ -32,6 +32,7 @@
 #undef G_LOG_DOMAIN
 #define G_LOG_DOMAIN "libgsf:msole"
 
+
 static GObjectClass *parent_class;
 
 typedef struct {
@@ -160,10 +161,12 @@
        res->block = (guint32 *) (gpointer) g_array_free (bat, FALSE);
 
        if (block != BAT_MAGIC_END_OF_CHAIN) {
+#if 0
                g_warning ("This OLE2 file is invalid.\n"
                           "The Block Allocation  Table for one of the streams 
had %x instead of a terminator (%x).\n"
                           "We might still be able to extract some data, but 
you'll want to check the file.",
                           block, BAT_MAGIC_END_OF_CHAIN);
+#endif
        }
 
        return FALSE;
@@ -360,18 +363,24 @@
 
        /* NOTE : These links are a tree, not a linked list */
        if (prev == entry) {
+#if 0
                g_warning ("Invalid OLE file with a cycle in its directory 
tree");
+#endif
        } else
                ole_dirent_new (ole, prev, parent);
        if (next == entry) {
+#if 0
                g_warning ("Invalid OLE file with a cycle in its directory 
tree");
+#endif
        } else
                ole_dirent_new (ole, next, parent);
 
        if (dirent->is_directory)
                ole_dirent_new (ole, child, dirent);
+#if 0
        else if (child != DIRENT_MAGIC_END)
                g_warning ("A non directory stream with children ?");
+#endif
 
        return dirent;
 }
@@ -520,7 +529,9 @@
        info->sb_file        = NULL;
 
        if (info->num_sbat == 0 && info->sbat_start != BAT_MAGIC_END_OF_CHAIN) {
+#if 0
                g_warning ("There is are not supposed to be any blocks in the 
small block allocation table, yet there is a link to some.  Ignoring it.");
+#endif
        }
 
        /* very rough heuristic, just in case */
@@ -779,7 +790,9 @@
                                info->sb.size,
                                child->stream.buf + (i << info->sb.shift))) == 
NULL) {
 
+#if 0
                                g_warning ("failure reading block %d", i);
+#endif
 
                                g_object_unref (G_OBJECT (child));
                                return NULL;

Modified: Extractor/src/plugins/ole2/gsf-utils.h
===================================================================
--- Extractor/src/plugins/ole2/gsf-utils.h      2005-06-25 21:41:49 UTC (rev 
1016)
+++ Extractor/src/plugins/ole2/gsf-utils.h      2005-06-25 22:17:01 UTC (rev 
1017)
@@ -74,4 +74,8 @@
 
 G_END_DECLS
 
+#undef g_return_val_if_fail
+#define g_return_val_if_fail(cond,ret) do{if (cond) return ret;}while(0)
+
+
 #endif /* GSF_UTILS_H */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]