From 04c7392cbd06c61af94388594ca12f4fbcfeb581a2caa98b9c0b2e584f8e9654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 17 Apr 2008 06:56:32 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python?expand=0&rev=18 --- python-2.5.2-from-string-and-size.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 python-2.5.2-from-string-and-size.patch diff --git a/python-2.5.2-from-string-and-size.patch b/python-2.5.2-from-string-and-size.patch new file mode 100644 index 0000000..359b5c5 --- /dev/null +++ b/python-2.5.2-from-string-and-size.patch @@ -0,0 +1,15 @@ +--- python/trunk/Objects/stringobject.c 2008/03/26 12:49:49 61936 ++++ python/trunk/Objects/stringobject.c 2008/04/10 19:50:36 62271 +@@ -55,7 +55,11 @@ + PyString_FromStringAndSize(const char *str, Py_ssize_t size) + { + register PyStringObject *op; +- assert(size >= 0); ++ if (size < 0) { ++ PyErr_SetString(PyExc_SystemError, ++ "Negative size passed to PyString_FromStringAndSize"); ++ return NULL; ++ } + if (size == 0 && (op = nullstring) != NULL) { + #ifdef COUNT_ALLOCS + null_strings++;