This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients Philipp.Lies, loewis
Date 2012-07-30.16:44:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343666652.91.0.484926489661.issue15504@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-07-30 16:44:12loewissetrecipients: + loewis, Philipp.Lies
2012-07-30 16:44:12loewissetmessageid: <1343666652.91.0.484926489661.issue15504@psf.upfronthosting.co.za>
2012-07-30 16:44:12loewislinkissue15504 messages
2012-07-30 16:44:11loewiscreate