diff Python/bltinmodule.c @ 1096:ce718457b172 legacy-trunk

* classobject.c: in instance_lenth, test result of call_object for exception before using it. Fixed a few other places where the outcome of calling sq_length wasn't tested for exceptions (bltinmodule.c, ceval.c).
author Guido van Rossum <guido@python.org>
date Thu, 26 Nov 1992 10:30:26 +0000
parents d2af6bdcb6d0
children 9d6cf529bb71
line wrap: on
line diff
--- a/Python/bltinmodule.c	Thu Nov 26 09:17:19 1992 +0000
+++ b/Python/bltinmodule.c	Thu Nov 26 10:30:26 1992 +0000
@@ -412,6 +412,8 @@
 		return NULL;
 	}
 	n = (*sq->sq_length)(v);
+	if (n < 0)
+		return NULL;
 	if (n == 0) {
 		err_setstr(ValueError, "min() or max() of empty sequence");
 		return NULL;