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

[dm-devel] [PATCH] Error check for NULL pointer libdm-iface.c



Hi everyone, I've made a patch for the NULL pointer segmentation fault
error I found in the file libdm-iface.c. Here's the patch text:

--- device-mapper.orig/lib/ioctl/libdm-iface.c	2007-08-02
15:58:25.000000000 -0700
+++ device-mapper/lib/ioctl/libdm-iface.c	2007-08-02
15:59:59.000000000 -0700
@@ -321,6 +321,9 @@
 {
 	struct target *t, *n;
 
+	if(!dmt)
+		return; /* NULL pointer would cause segfault */
+	
 	for (t = dmt->head; t; t = n) {
 		n = t->next;
 		dm_free(t->params);


Is there a contact person that I would submit userspace patches to? I
know Alasdair is the device-mapper maintainer, so is he the contact I
should submit to instead of the mailing list?

Thank you,  

Brian Wood
Intel Corporation 
Digital Enterprise Group
Manageability & Platform Software Division
brian j wood intel com

Attachment: libdm-iface_fix_segfault_dm_task_destroy.patch
Description: libdm-iface_fix_segfault_dm_task_destroy.patch


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