mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
PyParser_ParseString(): When the err_ret structure is initialized, the
fields token and expected must also be initialized, otherwise the tests in parsetok() can generate uninitialized memory read errors. This quiets an Insure warning.
This commit is contained in:
parent
5ca1ef9238
commit
38aa14afb6
1 changed files with 2 additions and 0 deletions
|
@ -36,6 +36,8 @@ PyParser_ParseString(char *s, grammar *g, int start, perrdetail *err_ret)
|
|||
err_ret->lineno = 0;
|
||||
err_ret->offset = 0;
|
||||
err_ret->text = NULL;
|
||||
err_ret->token = -1;
|
||||
err_ret->expected = -1;
|
||||
|
||||
if ((tok = PyTokenizer_FromString(s)) == NULL) {
|
||||
err_ret->error = E_NOMEM;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue