summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2000-08-18 05:04:08 (GMT)
committerBarry Warsaw <barry@python.org>2000-08-18 05:04:08 (GMT)
commit38aa14afb689021b22638a6c89199eca736a3802 (patch)
tree322303a9779140c9df1595bf9363226e71e0bc47 /Parser
parent5ca1ef92384d8e4e940bd34ce8150c087931b18b (diff)
downloadcpython-38aa14afb689021b22638a6c89199eca736a3802.zip
cpython-38aa14afb689021b22638a6c89199eca736a3802.tar.gz
cpython-38aa14afb689021b22638a6c89199eca736a3802.tar.bz2
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.
Diffstat (limited to 'Parser')
-rw-r--r--Parser/parsetok.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index 24bda83..5f51f6a 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;