Message93295
When unmarshalling a hand-written string it is possible to break the
invariants of longs:
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x = marshal.loads('l\x02\x00\x00\x00\x00\x00\x00\x00')
>>> print x
00000
>>> x == 0
False
>>> bool(x)
True
>>> x + 1
1L
I would expect this to raise an error instead. |
|
Date |
User |
Action |
Args |
2009-09-29 14:35:59 | Carl.Friedrich.Bolz | set | recipients:
+ Carl.Friedrich.Bolz |
2009-09-29 14:35:59 | Carl.Friedrich.Bolz | set | messageid: <1254234959.01.0.461220036741.issue7019@psf.upfronthosting.co.za> |
2009-09-29 14:35:57 | Carl.Friedrich.Bolz | link | issue7019 messages |
2009-09-29 14:35:57 | Carl.Friedrich.Bolz | create | |
|