@@ -7178,7 +7178,7 @@ decode_code_page_errors(UINT code_page,
71787178 "in the target code page." ;
71797179 /* each step cannot decode more than 1 character, but a character can be
71807180 represented as a surrogate pair */
7181- wchar_t buffer [2 ], * startout , * out ;
7181+ wchar_t buffer [2 ], * out ;
71827182 int insize ;
71837183 Py_ssize_t outsize ;
71847184 PyObject * errorHandler = NULL ;
@@ -7215,7 +7215,7 @@ decode_code_page_errors(UINT code_page,
72157215 * v = (PyObject * )_PyUnicode_New (size * Py_ARRAY_LENGTH (buffer ));
72167216 if (* v == NULL )
72177217 goto error ;
7218- startout = PyUnicode_AS_UNICODE (* v );
7218+ out = PyUnicode_AS_UNICODE (* v );
72197219 }
72207220 else {
72217221 /* Extend unicode object */
@@ -7226,11 +7226,10 @@ decode_code_page_errors(UINT code_page,
72267226 }
72277227 if (unicode_resize (v , n + size * Py_ARRAY_LENGTH (buffer )) < 0 )
72287228 goto error ;
7229- startout = PyUnicode_AS_UNICODE (* v ) + n ;
7229+ out = PyUnicode_AS_UNICODE (* v ) + n ;
72307230 }
72317231
72327232 /* Decode the byte string character per character */
7233- out = startout ;
72347233 while (in < endin )
72357234 {
72367235 /* Decode a character */
@@ -7285,7 +7284,7 @@ decode_code_page_errors(UINT code_page,
72857284 * out = 0 ;
72867285
72877286 /* Extend unicode object */
7288- outsize = out - startout ;
7287+ outsize = out - PyUnicode_AS_UNICODE ( * v ) ;
72897288 assert (outsize <= PyUnicode_WSTR_LENGTH (* v ));
72907289 if (unicode_resize (v , outsize ) < 0 )
72917290 goto error ;
0 commit comments