Fix NULL pointer reference in _outPathTarget() - Mailing list pgsql-hackers

From Richard Guo
Subject Fix NULL pointer reference in _outPathTarget()
Date
Msg-id CAMbWs4-LN=bF8f9eU2R94dJtF54DfDvBq+ovqHnOQqbinYDrUw@mail.gmail.com
Whole thread Raw
Responses Re: Fix NULL pointer reference in _outPathTarget()  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Fix NULL pointer reference in _outPathTarget()  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List 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

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Crash in new pgstats code
Next
From: Michael Paquier
Date:
Subject: Re: avoid multiple hard links to same WAL file after a crash