summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Python/import.c5
1 files changed, 5 insertions, 0 deletions
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 @@ load_next(mod, altmod, p_name, buf, p_buflen)
*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)