array_in() and array_recv() need to be more paranoid about validating
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 15 Aug 2005 19:41:06 +0000 (19:41 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 15 Aug 2005 19:41:06 +0000 (19:41 +0000)
commit3926bb2a8c48ab92cec7c5169cc261e737ca5745
tree63d252e610c91fe5325dea25f27eb38c0a3c412a
parent4b107bc5d153606fd0ff732ff636e4cc47ee0c94
array_in() and array_recv() need to be more paranoid about validating
their OID parameter.  It was possible to crash the backend with
select array_in('{123}',0,0); because that would bypass the needed step
of initializing the workspace.  These seem to be the only two places
with a problem, though (record_in and record_recv don't have the issue,
and the other array functions aren't depending on user-supplied input).
Back-patch as far as 7.4; 7.3 does not have the bug.
src/backend/utils/adt/arrayfuncs.c