- fix-potential-null-pointer-deref-in-gen_init_cpio.patch removed from -mm tree

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

 



The patch titled

     Fix potential NULL pointer deref in gen_init_cpio

has been removed from the -mm tree.  Its filename is

     fix-potential-null-pointer-deref-in-gen_init_cpio.patch

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.


From: Jesper Juhl <jesper.juhl@xxxxxxxxx>

Fix potential NULL pointer deref in gen_init_cpio.c spotted by coverity
checker.  This fixes coverity bug #86

Without this patch we risk dereferencing a NULL `type' in the
"if ('\n' == *type) {" line.

Signed-off-by: Jesper Juhl <jesper.juhl@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

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

diff -puN usr/gen_init_cpio.c~fix-potential-null-pointer-deref-in-gen_init_cpio usr/gen_init_cpio.c
--- devel/usr/gen_init_cpio.c~fix-potential-null-pointer-deref-in-gen_init_cpio	2006-04-18 22:20:02.000000000 -0700
+++ devel-akpm/usr/gen_init_cpio.c	2006-04-18 22:20:02.000000000 -0700
@@ -471,6 +471,7 @@ int main (int argc, char *argv[])
 				"ERROR: incorrect format, could not locate file type line %d: '%s'\n",
 				line_nr, line);
 			ec = -1;
+			break;
 		}
 
 		if ('\n' == *type) {
@@ -506,7 +507,8 @@ int main (int argc, char *argv[])
 				line_nr, line);
 		}
 	}
-	cpio_trailer();
+	if (ec == 0)
+		cpio_trailer();
 
 	exit(ec);
 }
_

Patches currently in -mm which might be from jesper.juhl@xxxxxxxxx are

origin.patch
git-mtd.patch
small-whitespace-cleanup-for-qlogic-driver.patch
reduce-nr-of-ptr-derefs-in-fs-jffs2-summaryc.patch
debug-shared-irqs.patch
remove-redundant-null-checks-before-free-in-fs.patch
remove-redundant-null-checks-before-free-in-arch.patch
remove-redundant-null-checks-before-free-in-kernel.patch
remove-redundant-null-checks-before-free-in-drivers.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux