Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37733333
en ru br
ALT Linux repos
S:2.7.18-alt11
5.0: 2.5.4-alt5
4.1: 2.5.4-alt0.M41.1
4.0: 2.4.5-alt0.M40.1
3.0: 2.4.1-alt5

Group :: Development/Python
RPM: python

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: python-2.5-CVE-2008-1721.patch
Download


Index: Objects/stringobject.c
===================================================================
--- Objects/stringobject.c	(revision 62261)
+++ Objects/stringobject.c	(revision 62262)
@@ -54,6 +54,11 @@
 {
 	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++;
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin