[Python-checkins] r46386 - sandbox/trunk/hotbuffer/Modules/_hotbuf.c

bob.ippolito python-checkins at python.org
Fri May 26 20:40:09 CEST 2006


Author: bob.ippolito
Date: Fri May 26 20:40:09 2006
New Revision: 46386

Modified:
   sandbox/trunk/hotbuffer/Modules/_hotbuf.c
Log:
return HotbufOverflow instead of struct.error on overflow

Modified: sandbox/trunk/hotbuffer/Modules/_hotbuf.c
==============================================================================
--- sandbox/trunk/hotbuffer/Modules/_hotbuf.c	(original)
+++ sandbox/trunk/hotbuffer/Modules/_hotbuf.c	Fri May 26 20:40:09 2006
@@ -743,6 +743,8 @@
         PyErr_SetString(PyExc_TypeError,
                         "unpack requires a single struct argument");
     
+    CHECK_LIMIT_ERROR(len);
+    
     result = PyObject_CallMethodObjArgs(structobj, 
                                         str_unpack_from, self, NULL);
     


More information about the Python-checkins mailing list