Kaydet (Commit) 38aa14af authored tarafından Barry Warsaw's avatar Barry Warsaw

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.
üst 5ca1ef92
......@@ -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;
......
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