[redland-dev] [Redland RDF API 0000285]: Memory corruption in postgresql storage module

Mantis Bug Tracker mantis-bug-sender at librdf.org
Thu Nov 6 23:03:30 CET 2008


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=285 
====================================================================== 
Reported By:                jfieber
Assigned To:                
====================================================================== 
Project:                    Redland RDF API
Issue ID:                   285
Category:                   api
Reproducibility:            sometimes
Severity:                   crash
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2008-11-06 22:03
Last Modified:              2008-11-06 22:03
====================================================================== 
Summary:                    Memory corruption in postgresql storage module
Description: 
In librdf_storage_postgresql_get_contexts, when allocating a memory for
storing row results for iteration, N bytes are allocated instead of N
size_t, resulting in memory corruption, and the wide array of
unpredictable side effects of that.

Attached is a patch to fix that.

This may be related to corruption reported in issue #102. 

(The patch also removes an unused function with a "FIXME: why is this not
used ?" comment.  It isn't used because the memory the function frees
belongs to a PGresult struct and is freed when that struct is freed with
the appropriate postgresql API.)
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-11-06 22:03 jfieber        New Issue                                    
2008-11-06 22:03 jfieber        File Added: postgresql_crasher.patch            
       
======================================================================



More information about the redland-dev mailing list