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 vstinner
Recipients vstinner
Date 2008-07-08.22:58:08
SpamBayes Score 0.013577298
Marked as misclassified No
Message-id <1215557890.28.0.315205708793.issue3322@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-07-08 22:58:10vstinnersetspambayes_score: 0.0135773 -> 0.013577298
recipients: + vstinner
2008-07-08 22:58:10vstinnersetspambayes_score: 0.0135773 -> 0.0135773
messageid: <1215557890.28.0.315205708793.issue3322@psf.upfronthosting.co.za>
2008-07-08 22:58:09vstinnerlinkissue3322 messages
2008-07-08 22:58:08vstinnercreate