Assert fcinfo has enough args before allowing parameter access (was: Re: generate_series for timestamptz and time zone problem) - Mailing list pgsql-hackers

From Gurjeet Singh
Subject Assert fcinfo has enough args before allowing parameter access (was: Re: generate_series for timestamptz and time zone problem)
Date
Msg-id CABwTF4X+gmYDf0mknyu0VjAuqpTuxEDjx16=VAuDZdLWHJYyoA@mail.gmail.com
Whole thread Raw
Responses Re: Assert fcinfo has enough args before allowing parameter access (was: Re: generate_series for timestamptz and time zone problem)
List pgsql-hackers
On Mon, Jan 30, 2023 at 11:50 PM Gurjeet Singh <gurjeet@singh.im> wrote:
> It was the classical case of out-of-bounds access.

> This mistake would've been caught early if there were assertions
> preventing access beyond the number of arguments passed to the
> function. I'll send the assert_enough_args.patch, that adds these
> checks, in a separate thread to avoid potentially confusing cfbot.

Please see attached the patch to that ensures we don't accidentally
access more parameters than that are passed to a SQL callable
function.

Best regards,
Gurjeet
http://Gurje.et

Attachment

pgsql-hackers by date:

Previous
From: Gurjeet Singh
Date:
Subject: Re: generate_series for timestamptz and time zone problem
Next
From: "Joel Jacobson"
Date:
Subject: Re: [PATCH] Fix old thinko in formula to compute sweight in numeric_sqrt().