Message158810
| Author |
loewis |
| Recipients |
Arfrever, ezio.melotti, loewis, pitrou, serhiy.storchaka, vstinner |
| Date |
2012年04月20日.09:53:22 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1334915603.51.0.635458785241.issue14579@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
[moving from Rietveld back to Roundup]
On 2012年04月20日 11:15:48, storchaka wrote:
> The `aligned_end` may point outside unicode object,
> if the unicode object was reallocated.
How so? The aligned_end *never* points into the unicode object:
q = (unsigned char *)s;
e = q + size - 1;
aligned_end = (const unsigned char *) ((size_t) e & ~LONG_PTR_MASK);
So aligned_end points into s, not into the unicode object.
So this adjustment is necessary because the *input* may change in the callback,
not because the output may change. So the comment in decode_utf8_errors seems
just as wrong.
Why this is relevant to this issue, is unclear to me, though: the ignore handler
doesn't modify the input object. |
|