➜

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.

作者 vstinner
收信人 vstinner
日期 2008-07-08.22:58:08
SpamBayes Score 0.013577298
Marked as misclassified 否
Message-id <1215557890.28.0.315205708793.issue3322@psf.upfronthosting.co.za>
In-reply-to
内容
scanstring_str() and scanstring_unicode() functions don't end value 
whereas it can be outside input string range. A check like this is 
needed:
    if (end < 0 || len <= end) {
        PyErr_SetString(PyExc_ValueError, "xxx");
        return NULL;
    }

next is set to begin but few lines later (before first use of next), 
it's set to end: for (next = end; ...). 

In error message, eg. "Invalid control character at (...)", begin is 
used as character position but I think that the right position is in 
the variable "end" (or maybe "next"?).

I'm unable to fix these functions because I don't understand the code.
历史
日期 用户 动作 参数
2008-07-08 22:58:10vstinner修改spambayes_score: 0.0135773 -> 0.013577298
recipients: + vstinner
2008-07-08 22:58:10vstinner修改spambayes_score: 0.0135773 -> 0.0135773
messageid: <1215557890.28.0.315205708793.issue3322@psf.upfronthosting.co.za>
2008-07-08 22:58:09vstinner链接issue3322 messages
2008-07-08 22:58:08vstinner创建