Guido van Rossum 106f2dae86 Trent Mick:
Various small fixes to the builtin module to ensure no buffer
overflows.

- chunk #1:
Proper casting to ensure no truncation, and hence no surprises, in the
comparison.

- chunk #2:
The id() function guarantees a unique return value for different
objects.  It does this by returning the pointer to the object. By
returning a PyInt, on Win64 (sizeof(long) < sizeof(void*)) the pointer
is truncated and the guarantee may be proven false. The appropriate
return function is PyLong_FromVoidPtr, this returns a PyLong if that
is necessary to return the pointer without truncation.

[GvR: note that this means that id() can now return a long on Win32
platforms.  This *might* break some code...]

- chunk #3:
Ensure no overflow in raw_input(). Granted the user would have to pass
in >2GB of data but it *is* a possible buffer overflow condition.
2000-06-28 21:12:25 +00:00
..
2000-05-02 18:34:30 +00:00
1996-10-25 14:44:06 +00:00
2000-06-28 21:12:25 +00:00
2000-05-08 14:06:50 +00:00
2000-05-09 19:55:59 +00:00
1999-12-22 14:09:35 +00:00
1999-12-22 14:09:35 +00:00
1999-12-22 14:09:35 +00:00
1999-12-22 14:09:35 +00:00
1996-10-25 14:44:06 +00:00
2000-05-09 21:50:00 +00:00
1997-07-19 19:48:41 +00:00
1996-10-25 14:44:06 +00:00
1997-09-05 07:33:22 +00:00
1997-07-19 19:48:41 +00:00
1996-08-29 18:10:41 +00:00
1999-12-22 14:09:35 +00:00
2000-06-28 18:47:56 +00:00
1999-06-18 14:22:24 +00:00
2000-05-11 12:53:51 +00:00
1999-03-15 20:27:53 +00:00