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)) {
|
} else if (SPECIAL(ch,0,0)) {
|
||||||
errmsg = "unexpected special character";
|
errmsg = "unexpected special character";
|
||||||
goto utf7Error;
|
goto utf7Error;
|
||||||
} else {
|
} else {
|
||||||
*p++ = ch;
|
*p++ = ch;
|
||||||
}
|
}
|
||||||
|
@ -1036,9 +1036,10 @@ PyObject *PyUnicode_DecodeUTF7(const char *s,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (SPECIAL(ch,0,0)) {
|
else if (SPECIAL(ch,0,0)) {
|
||||||
|
startinpos = s-starts;
|
||||||
errmsg = "unexpected special character";
|
errmsg = "unexpected special character";
|
||||||
s++;
|
s++;
|
||||||
goto utf7Error;
|
goto utf7Error;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
*p++ = ch;
|
*p++ = ch;
|
||||||
|
|
Loading…
Reference in New Issue