| From: | Richard Guo <guofenglinux(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Fix NULL pointer reference in _outPathTarget() |
| Date: | 2022-04-18 07:35:53 |
| Message-ID: | CAMbWs4-LN=bF8f9eU2R94dJtF54DfDvBq+ovqHnOQqbinYDrUw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
The array sortgrouprefs[] inside PathTarget might be NULL if we have not
identified sort/group columns in this tlist. In that case we would have
a NULL pointer reference in _outPathTarget() when trying to print
sortgrouprefs[] with WRITE_INDEX_ARRAY as we are using the length of
PathTarget->exprs as its array length.
Attached is a fix that can address this problem.
Thanks
Richard
| Attachment | Content-Type | Size |
|---|---|---|
| fix_array_length_for_printing_sortgrouprefs.patch | application/octet-stream | 690 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2022-04-18 07:48:35 | Re: avoid multiple hard links to same WAL file after a crash |
| Previous Message | Michael Paquier | 2022-04-18 07:18:52 | Re: Crash in new pgstats code |