]> granicus.if.org Git - python/commitdiff
In raw_input(prompt), make sure that str(prompt) really a string
authorGuido van Rossum <guido@python.org>
Fri, 26 Jun 1998 18:25:38 +0000 (18:25 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 26 Jun 1998 18:25:38 +0000 (18:25 +0000)
object before using it.

Python/bltinmodule.c

index 3aba792d0088a762105678cd63c5f1ae10c657cd..c894ec57155f647433504ebc8254e140cf2d2857 100644 (file)
@@ -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;