Commit e9ef30b
authored
Zero-initialize parent_cpstate in analyze_cypher (#2423)
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.
Co-authored-by: Hari Krishna Sunder <12418230+hari90@users.noreply.github.com>1 parent 54e19fa commit e9ef30b
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