Re: pg_regress/pg_isolation_regress: Fix possible nullptr dereference.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Xing Guo <higuoxing@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-11-30T16:59:48Z
Lists: pgsql-hackers
Xing Guo <higuoxing@gmail.com> writes: > 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. Hmm, yeah, I see that too. > Patch is attached. This patch seems like a band-aid, though. The reason nobody's noticed this for decades is that it doesn't make a lot of sense to allow tests to run in your default database: the odds of them screwing up something valuable are high, and the odds that they'll fail if started in a nonempty database are even higher. I think the right answer is to treat it as an error if we end up with an empty dblist (or even a zero-length name). regards, tom lane
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Reject missing database name in pg_regress and cohorts.
- f2f9e11d3522 15.2 landed
- d5515ca7cf1b 16.0 landed
- ae9939020dda 13.10 landed
- a949b7320fdf 14.7 landed
- a587901786d5 12.14 landed
- 04f3acc97e42 11.19 landed