commit | e78e5d2e515167df8fdf0a551e8333c31c6a1ba3 | [log] [tgz] |
---|---|---|
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | Fri Jul 17 06:20:46 2009 +0000 |
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | Fri Jul 17 06:20:46 2009 +0000 |
tree | c2e1a0cd2d72eb5a4679e58404853dd0d1b85574 | |
parent | 66da2635ff0f3eed66d0c6d6e2e3e67d5943950c [diff] [blame] |
Issue #6415: Fixed warnings.warn sagfault on bad formatted string.
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 @@ } if (rc == 1) { text = PyObject_Str(message); + if (text == NULL) + goto cleanup; category = (PyObject*)message->ob_type; } else {