Martin v. Löwis added the comment:

People can probably debate endless about seriousness of an issue. Keep in mind 
that two factors affect seriousness: what's the impact when it happens (here it 
is "quite bad"), and what's the chance that it happens (it's "quite low", since 
it requires you to pickle very long string objects, which only few people ever 
attempt). So these two cancel them out, in some form.

That said, I certainly agree that it needs to be fixed. AFAICT, the issue is 
that save_string uses "int" for size and len, when it should use Py_ssize_t. In 
addition, it shouldn't check for INT_MAX, but 0x7fffffff, since INT_MAX might 
be 2**63-1 on systems where int is a 64-bit type - but that should not be a 
problem on your system. I believe the bug exists in more cases; e.g. saving 
BINUNICODE.

Also, AFAICT, this shouldn't be a problem for 3.x, which already checks for 
overflow.

Then, AFAICT, there is a glitch in the BINUNICODE handling of 3.x, which 
rejects strings longer than 0xffffffff, when the  maximum supported length 
really is 0x7fffffff.

----------
nosy: +loewis

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15504>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to