Commit ef8e19a
committed
Zero-initialize parent_cpstate in analyze_cypher
cypher_parsestate parent_cpstate is declared on the stack in
analyze_cypher() and only pstate, graph_name, and params are explicitly
set before it is passed to make_cypher_parsestate(). The latter reads
parent_cpstate->subquery_where_flag (and other fields) in
cypher_parse_node.c, which leaves them with indeterminate values. UBSan
flagged the garbage bool (value 8) and aborted the backend.
Use MemSet to zero the struct before populating the explicit fields so
all remaining members start with a defined value.1 parent 54e19fa commit ef8e19a
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
| 964 | + | |
964 | 965 | | |
965 | 966 | | |
966 | 967 | | |
| |||
0 commit comments