From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: dan-eli@mail.ru
Subject: BUG #18867: /src/interfaces/ecpg/preproc/descriptor.c usage of ECPGdump_a_type
Date: Wed, 26 Mar 2025 10:13:59 +0000
Message-ID: <18867-242fff4b17a0c5be@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 18867
Logged by: Daniel Elishakov
Email address: dan-eli@mail.ru
PostgreSQL version: 17.4
Operating system: ubuntu 20.04
Description:
After having been assigned to a NULL value at descriptor.c:203 and
descriptor.c:313, pointer '0' is passed as 5th parameter in call to function
'ECPGdump_a_type', where it is dereferenced at type.c:332.
if (indicator_set && ind_type->type != ECPGt_struct)
mmfatal(INDICATOR_NOT_STRUCT, "indicator for struct has to be a
struct");
It seems that a struct data type should not be used in 'EXEC SQL GET
DESCRIPTOR' command, so the code in question should never be executed and it
is not a problem. However there are no actual checks for corrrectess of the
provided data type. I think it is required to add a check agains wrong data
types supplied by the user.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, dan-eli@mail.ru
Subject: Re: BUG #18867: /src/interfaces/ecpg/preproc/descriptor.c usage of ECPGdump_a_type
In-Reply-To: <18867-242fff4b17a0c5be@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox