diff options
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2009-07-17 06:20:46 (GMT) |
---|---|---|
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2009-07-17 06:20:46 (GMT) |
commit | e78e5d2e515167df8fdf0a551e8333c31c6a1ba3 (patch) | |
tree | c2e1a0cd2d72eb5a4679e58404853dd0d1b85574 /Python | |
parent | 66da2635ff0f3eed66d0c6d6e2e3e67d5943950c (diff) | |
download | cpython-e78e5d2e515167df8fdf0a551e8333c31c6a1ba3.zip cpython-e78e5d2e515167df8fdf0a551e8333c31c6a1ba3.tar.gz cpython-e78e5d2e515167df8fdf0a551e8333c31c6a1ba3.tar.bz2 |
Issue #6415: Fixed warnings.warn sagfault on bad formatted string.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/_warnings.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 219cfc6..18fcdac 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -317,6 +317,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 { |