Mark Lawrence: > If my sleuthing is correct the problem is with these lines > > ilow *= self->itemSize; > ihigh *= self->itemSize; > > in GapBuffer_slice being computed before ilow and ihigh are compared to > anything.
This particular bug was because ihigh is the maximum 32 bit integer 2147483647 so multiplying it by the integer item size (4) caused overflow. Adding an extra check fixes this: if (ihigh > self->lengthBody / self->itemSize) ihigh = self->lengthBody / self->itemSize; Committed a new version 1.02 and new downloads are available from Google code. http://code.google.com/p/gapbuffer/downloads/list Neil -- http://mail.python.org/mailman/listinfo/python-list