Reject empty module names -- otherwise __import__("") does something
weird!
diff --git a/Python/import.c b/Python/import.c
index 6eb794f2..afbd4d8 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1515,6 +1515,11 @@
 		*p_name = dot+1;
 		len = dot-name;
 	}
+	if (len == 0) {
+		PyErr_SetString(PyExc_ValueError,
+				"Empty module name");
+		return NULL;
+	}
 
 	p = buf + *p_buflen;
 	if (p != buf)