Commit e30e73c
Zero-initialize parent_cpstate in analyze_cypher
cypher_parsestate parent_cpstate is declared on the stack in
analyze_cypher() and only pstate is 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 pstate so all remaining
members start with a defined value.1 parent 54e19fa commit e30e73c
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
| 964 | + | |
964 | 965 | | |
965 | | - | |
966 | | - | |
967 | 966 | | |
968 | 967 | | |
969 | 968 | | |
| |||
0 commit comments