From: Barry Warsaw Date: Fri, 18 Aug 2000 05:04:08 +0000 (+0000) Subject: PyParser_ParseString(): When the err_ret structure is initialized, the X-Git-Tag: v2.0b1~378 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38aa14afb689021b22638a6c89199eca736a3802;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Parser/parsetok.c b/Parser/parsetok.c index 24bda836c504..5f51f6adbdb6 100644 --- a/Parser/parsetok.c +++ b/Parser/parsetok.c @@ -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;