@@ -7285,7 +7285,7 @@ decode_code_page_errors(UINT code_page,
72857285 "in the target code page." ;
72867286 /* each step cannot decode more than 1 character, but a character can be
72877287 represented as a surrogate pair */
7288- wchar_t buffer [2 ], * startout , * out ;
7288+ wchar_t buffer [2 ], * out ;
72897289 int insize ;
72907290 Py_ssize_t outsize ;
72917291 PyObject * errorHandler = NULL ;
@@ -7322,7 +7322,7 @@ decode_code_page_errors(UINT code_page,
73227322 * v = (PyObject * )_PyUnicode_New (size * Py_ARRAY_LENGTH (buffer ));
73237323 if (* v == NULL )
73247324 goto error ;
7325- startout = PyUnicode_AS_UNICODE (* v );
7325+ out = PyUnicode_AS_UNICODE (* v );
73267326 }
73277327 else {
73287328 /* Extend unicode object */
@@ -7333,11 +7333,10 @@ decode_code_page_errors(UINT code_page,
73337333 }
73347334 if (unicode_resize (v , n + size * Py_ARRAY_LENGTH (buffer )) < 0 )
73357335 goto error ;
7336- startout = PyUnicode_AS_UNICODE (* v ) + n ;
7336+ out = PyUnicode_AS_UNICODE (* v ) + n ;
73377337 }
73387338
73397339 /* Decode the byte string character per character */
7340- out = startout ;
73417340 while (in < endin )
73427341 {
73437342 /* Decode a character */
@@ -7392,7 +7391,7 @@ decode_code_page_errors(UINT code_page,
73927391 * out = 0 ;
73937392
73947393 /* Extend unicode object */
7395- outsize = out - startout ;
7394+ outsize = out - PyUnicode_AS_UNICODE ( * v ) ;
73967395 assert (outsize <= PyUnicode_WSTR_LENGTH (* v ));
73977396 if (unicode_resize (v , outsize ) < 0 )
73987397 goto error ;
0 commit comments