@@ -7211,7 +7211,7 @@ decode_code_page_errors(UINT code_page,
72117211 "in the target code page." ;
72127212 /* each step cannot decode more than 1 character, but a character can be
72137213 represented as a surrogate pair */
7214- wchar_t buffer [2 ], * startout , * out ;
7214+ wchar_t buffer [2 ], * out ;
72157215 int insize ;
72167216 Py_ssize_t outsize ;
72177217 PyObject * errorHandler = NULL ;
@@ -7248,7 +7248,7 @@ decode_code_page_errors(UINT code_page,
72487248 * v = (PyObject * )_PyUnicode_New (size * Py_ARRAY_LENGTH (buffer ));
72497249 if (* v == NULL )
72507250 goto error ;
7251- startout = PyUnicode_AS_UNICODE (* v );
7251+ out = PyUnicode_AS_UNICODE (* v );
72527252 }
72537253 else {
72547254 /* Extend unicode object */
@@ -7259,11 +7259,10 @@ decode_code_page_errors(UINT code_page,
72597259 }
72607260 if (unicode_resize (v , n + size * Py_ARRAY_LENGTH (buffer )) < 0 )
72617261 goto error ;
7262- startout = PyUnicode_AS_UNICODE (* v ) + n ;
7262+ out = PyUnicode_AS_UNICODE (* v ) + n ;
72637263 }
72647264
72657265 /* Decode the byte string character per character */
7266- out = startout ;
72677266 while (in < endin )
72687267 {
72697268 /* Decode a character */
@@ -7318,7 +7317,7 @@ decode_code_page_errors(UINT code_page,
73187317 * out = 0 ;
73197318
73207319 /* Extend unicode object */
7321- outsize = out - startout ;
7320+ outsize = out - PyUnicode_AS_UNICODE ( * v ) ;
73227321 assert (outsize <= PyUnicode_WSTR_LENGTH (* v ));
73237322 if (unicode_resize (v , outsize ) < 0 )
73247323 goto error ;
0 commit comments