hal: Branch 'origin'

David Zeuthen david at kemper.freedesktop.org
Sun Oct 8 11:32:31 PDT 2006


 partutil/partutil.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

New commits:
diff-tree 51b841cd59a73fc093535ddd9e512d3036ebbbc4 (from bc96ff3b760917f4431015d9782d3d70f8b337ea)
Author: David Zeuthen <davidz at redhat.com>
Date:   Wed Oct 4 16:10:40 2006 -0400

    don't add non-existing partition entries for MS-DOS disk labels
    
    I think the issue is that the users who run into this have broken
    partition extended tables, e.g. we error out in the function
    part_table_probe_msdos_extended() and thus return NULL for the
    extended partition table. We then stuff a NULL pointer into the
    entries list and that's causing the crash on freeing the partition
    table or looking through entries. This patch should fix at least the
    crashes.

diff --git a/partutil/partutil.c b/partutil/partutil.c
index 5da36d5..3a2c87b 100644
--- a/partutil/partutil.c
+++ b/partutil/partutil.c
@@ -585,7 +585,9 @@ part_table_parse_msdos (int fd, guint64 
 
 		//HAL_INFO (("pe = %p", pe));
 
-		p->entries = g_slist_append (p->entries, pe);
+		if (pe != NULL) {
+			p->entries = g_slist_append (p->entries, pe);
+		}
 	}
 
 out:


More information about the hal-commit mailing list