summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2009-07-17 06:33:03 (GMT)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2009-07-17 06:33:03 (GMT)
commitfcaa2104aaaaefde1527396b1aa8762d07b1aa4a (patch)
tree7eb976a8bee44449967ff775312714501db17032 /Python
parenteed738bec0386092378d03c4242ee25be0a6ff44 (diff)
downloadcpython-fcaa2104aaaaefde1527396b1aa8762d07b1aa4a.zip
cpython-fcaa2104aaaaefde1527396b1aa8762d07b1aa4a.tar.gz
cpython-fcaa2104aaaaefde1527396b1aa8762d07b1aa4a.tar.bz2
Merged revisions 74040,74042 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r74040 | hirokazu.yamamoto | 2009-07-17 15:20:46 +0900 | 1 line Issue #6415: Fixed warnings.warn sagfault on bad formatted string. ........ r74042 | hirokazu.yamamoto | 2009-07-17 15:26:54 +0900 | 1 line NEWS about r74040. ........
Diffstat (limited to 'Python')
-rw-r--r--Python/_warnings.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 6a970bb..1f0f58e 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -304,6 +304,8 @@ warn_explicit(PyObject *category, PyObject *message,
}
if (rc == 1) {
text = PyObject_Str(message);
+ if (text == NULL)
+ goto cleanup;
category = (PyObject*)message->ob_type;
}
else {