summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-06-26 18:25:38 (GMT)
committerGuido van Rossum <guido@python.org>1998-06-26 18:25:38 (GMT)
commitd9b5208e903a7149a3c5733abbaf7f59f3d7c426 (patch)
tree19dcb7a167a9424adf1fb14f72f59db7925c6eb3
parent1bb26872f565fa886bc20f94bfdbb1771032fa6a (diff)
downloadcpython-d9b5208e903a7149a3c5733abbaf7f59f3d7c426.zip
cpython-d9b5208e903a7149a3c5733abbaf7f59f3d7c426.tar.gz
cpython-d9b5208e903a7149a3c5733abbaf7f59f3d7c426.tar.bz2
In raw_input(prompt), make sure that str(prompt) really a string
object before using it.
-rw-r--r--Python/bltinmodule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 3aba792..c894ec5 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1191,6 +1191,8 @@ builtin_raw_input(self, args)
if (po == NULL)
return NULL;
prompt = PyString_AsString(po);
+ if (prompt == NULL)
+ return NULL;
}
else {
po = NULL;