pg_regress/pg_isolation_regress: Fix possible nullptr dereference.

Xing Guo <higuoxing@gmail.com>

From: Xing Guo <higuoxing@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-11-30T15:02:35Z
Lists: pgsql-hackers

Attachments

Hi hackers,

While playing with pg_regress and pg_isolation_regress, I noticed that
there's a potential nullptr deference in both of them.

How to reproduce:

Specify the `--dbname=` option without providing any database name.

<path>/<to>/pg_regress --dbname=   foo
<path>/<to>/pg_isolation_regress --dbname=   foo

Patch is attached.

-- 
Best Regards,
Xing

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Reject missing database name in pg_regress and cohorts.