commit | 111c20b992e523dd094d9b3c459aa21eb2778cea | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Sat Apr 11 17:38:22 1998 +0000 |
committer | Guido van Rossum <guido@python.org> | Sat Apr 11 17:38:22 1998 +0000 |
tree | 8189f8d06796502793f6edec8b231e0aeb7bb1cc | |
parent | 70c460c84d3b025f005e158ec83d6b083368025a [diff] [blame] |
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)