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

Wood, Brian J brian.j.wood at intel.com
Thu Aug 2 23:21:35 UTC 2007


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 at intel.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libdm-iface_fix_segfault_dm_task_destroy.patch
Type: application/octet-stream
Size: 348 bytes
Desc: libdm-iface_fix_segfault_dm_task_destroy.patch
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20070802/beaf68d9/attachment.obj>


More information about the dm-devel mailing list