[redland-dev] redland 1.0.3 patch fix for

Dave Beckett dave at dajobe.org
Sun Feb 19 23:48:05 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The patch below fixes a problem I've seen recently especially via python
bindings, although the bug is in Redland itself.  The symptom has been
recently seen as scary errors from glibc like this:

$ python2.4 /usr/share/doc/python2.4-librdf/examples/example.py
found statement: {[http://purl.org/net/dajobe/],
[http://purl.org/dc/elements/1.1/creator], "Dave Beckett"}
Parsing URI (file) ../data/dc.rdf
*** glibc detected *** double free or corruption (!prev):
0x00000000006e2560 ***
Aborted (core dumped)

Actually as you can see, it's due to an extra fclose() on a file handle.
Seems to fix it and looks like it has been a bug for some time.

I don't think I'll make a redland 1.0.4 just for this one line change,
although I've applied it to the redland debs, just uploaded to
download.librdf.org.

Dave

- -----------------
- --- redland-1.0.2/librdf/rdf_parser_raptor.c.orig       26 Jan 2006
04:57:32 -0000      1.84
+++ redland-1.0.2/librdf/rdf_parser_raptor.c    19 Feb 2006 20:34:03 -0000
@@ -331,7 +331,6 @@
   }

   if(feof(context->fh) || status <1) {
- -    fclose(context->fh);
     context->fh=NULL;
   }

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD+QOzQ+ySUE9xlVoRAlrMAKCP3Mx6JZ3lvgi/IZib4Gq/+eQDwgCeN+Vy
EUfSr11N8SvDs5TDXYO22k4=
=QXo+
-----END PGP SIGNATURE-----


More information about the redland-dev mailing list