commit 5310ef68d5feaa6a2a19d46125af0c76bdb9bd12
parent 17bea9ed4d14aa13c25d2bd023a660e8a5b0c565
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 26 Jan 2005 16:27:47 +0000
On Tuesday 11 January 2005 06:07, Cristalle Azundris Sabon wrote:
> Hi Christian,
>
> Not sure what was going on here; I found this crash when I got up
> this morning. My best guess is that extractor tried to analyse
> the file while it was being written to?
>
> Not sure something real can or should be done about this, just
> remember your saw it here first! : )
Well, g_quark_from_static_string is a glib function, and looking over the code the place where it is called looks like a perfectly legal invocation of the function. It is also the only place in the code to this part of glib, so some bad interaction is probably not going to happen either. It looks very much like a bug in glib to me. However, as far as LE goes, we don't really need the quark, so I've changed the code in a way such that this function should not get called at all -- fewer code, fewer bugs :-).
#0 0xb73a79b8 in strcmp () from /lib/tls/libc.so.6
#1 0xb74973f4 in g_str_equal (v1=0xb548e4eb, v2=0xb548e4eb) at gstring.c:68
#2 0xb74721b8 in g_hash_table_lookup (hash_table=0x80ae3c0, key=0xb58034eb)
at ghash.c:200
#3 0xb746b147 in g_quark_from_static_string (
string=0xb58034eb "gsf_input_error") at gdataset.c:592
#4 0xb57da9bf in gsf_input_error () at gsf-input.c:437
#5 0xb57dc71f in ole_init_info (ole=0x8507590, err=0xbfffdb48)
at gsf-infile-msole.c:482
#6 0xb57dcd7c in gsf_infile_msole_new (source=0x8507268, err=0xbfffdb48)
at gsf-infile-msole.c:905
#7 0xb57da260 in libextractor_ole2_extract (
filename=0x8482db8 "/home/azundris/./.fetchmail.pid",
date=0xb56c8000 "16555", size=5, prev=0x0) at ole2extractor.c:937
#8 0xb580def3 in EXTRACTOR_getKeywords (extractor=0x84f4da8,
filename=0x8482db8 "/home/azundris/./.fetchmail.pid") at extractor.c:595
Diffstat:
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/plugins/ole2/ole2extractor.c b/src/plugins/ole2/ole2extractor.c
@@ -923,7 +923,6 @@ struct EXTRACTOR_Keywords * libextractor_ole2_extract(const char * filename,
struct EXTRACTOR_Keywords * prev) {
GsfInput *input;
GsfInfile *infile;
- GError *err;
guint8 const *data;
size_t len;
int i;
@@ -934,13 +933,11 @@ struct EXTRACTOR_Keywords * libextractor_ole2_extract(const char * filename,
if (input == NULL)
return prev;
- infile = gsf_infile_msole_new(input, &err);
+ infile = gsf_infile_msole_new(input, NULL);
g_object_unref(G_OBJECT(input));
- if (infile == NULL) {
- g_error_free(err);
+ if (infile == NULL)
return prev;
- }
if (GSF_IS_INFILE(infile) &&
gsf_infile_num_children (GSF_INFILE (infile)) > 0) {