diff -r 60f7719c0415 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Fri Apr 13 21:05:36 2012 -0600 +++ b/Objects/unicodeobject.c Sat Apr 14 21:24:47 2012 +0300 @@ -5608,6 +5608,9 @@ &unicode, &outpos)) goto onError; + /* Update data because unicode_decode_call_errorhandler might have + re-created or resized the unicode object. */ + aligned_end = (const unsigned char *) ((size_t) e & ~LONG_PTR_MASK); } /* remaining byte at the end? (size should be even) */ if (e == q) {