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++;