From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18769: ldapscheme is not displayed in pg_hba_file_rules
Date: Sun, 12 Jan 2025 10:55:56 -0500
Message-ID: <286764.1736697356@sss.pgh.pa.us> (raw)
In-Reply-To: <BF719DE8-5669-42D8-8225-7242D259361E@yesql.se>
References: <18769-dd8610cbc0405172@postgresql.org>
<513a15b5ff69d6023b57e78bbcf5a7c17180cedc.camel@cybertec.at>
<b9493f47474b40ab16cc533fad86b2ae1f340441.camel@cybertec.at>
<FD025B03-405C-47BE-B63F-666DD006992D@yesql.se>
<57d4c723872ae41562dee14c52888167becf9a1f.camel@cybertec.at>
<BF719DE8-5669-42D8-8225-7242D259361E@yesql.se>
Daniel Gustafsson <daniel@yesql.se> writes:
> I'm planning to do it today, so no need to add it. Thanks!
Our weekly Coverity run complained about this in all branches:
*** CID 181934: Memory - corruptions (OVERRUN)
/srv/coverity/git/pgsql-git/13stable/src/backend/libpq/hba.c: 2368 in gethba_options()
2362 if (hba->ldapsearchfilter)
2363 options[noptions++] =
2364 CStringGetTextDatum(psprintf("ldapsearchfilter=%s",
2365 hba->ldapsearchfilter));
2366
2367 if (hba->ldapscope)
>>> CID 181934: Memory - corruptions (OVERRUN)
>>> Overrunning array "options" of 14 8-byte elements at element index 14 (byte offset 119) using index "noptions++" (which evaluates to 14).
2368 options[noptions++] =
2369 CStringGetTextDatum(psprintf("ldapscope=%d", hba->ldapscope));
2370 }
2371
2372 if (hba->auth_method == uaRADIUS)
2373 {
Looks like you should have increased MAX_HBA_OPTIONS. The comment
just above that macro needs work too.
regards, tom lane
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: tgl@sss.pgh.pa.us, daniel@yesql.se, laurenz.albe@cybertec.at, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18769: ldapscheme is not displayed in pg_hba_file_rules
In-Reply-To: <286764.1736697356@sss.pgh.pa.us>
* 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