Issue 708201: unchecked return value in import.c (original) (raw)

In Python/import.c, routine PyImport_ImportModule, a call to PyString_AsString is not checked for errors. A possibly NULL return value gets passed to another routine, and DECREFed. It's not a particularly likely place for an error to occur, but I did manage to get a MemoryError at exactly that point, resulting in a Python crash.