Commit c261e486 authored by Guido van Rossum's avatar Guido van Rossum

Avoid potential for undefined variable 'startinpos' in PyUnicode_DecodeUTF7().

See issue #5389.
parent 2a67a849
......@@ -1012,7 +1012,7 @@ PyObject *PyUnicode_DecodeUTF7(const char *s,
}
} else if (SPECIAL(ch,0,0)) {
errmsg = "unexpected special character";
goto utf7Error;
goto utf7Error;
} else {
*p++ = ch;
}
......@@ -1036,9 +1036,10 @@ PyObject *PyUnicode_DecodeUTF7(const char *s,
}
}
else if (SPECIAL(ch,0,0)) {
startinpos = s-starts;
errmsg = "unexpected special character";
s++;
goto utf7Error;
goto utf7Error;
}
else {
*p++ = ch;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment