Add sanity check to dm_table_add_target() against zero length targets.  [Christophe Saout]
--- diff/drivers/md/dm-table.c	2004-02-09 10:42:49.000000000 +0000
+++ source/drivers/md/dm-table.c	2004-02-09 10:42:56.000000000 +0000
@@ -655,6 +655,11 @@
 	memset(tgt, 0, sizeof(*tgt));
 	set_default_limits(&tgt->limits);
 
+	if (!len) {
+		tgt->error = "zero-length target";
+		return -EINVAL;
+	}
+
 	tgt->type = dm_get_target_type(type);
 	if (!tgt->type) {
 		tgt->error = "unknown target type";
