Avoid potential for undefined variable 'startinpos' in PyUnicode_DecodeUTF7().
See issue #5389.
This commit is contained in:
parent
2a67a84954
commit
c261e4868b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue