Re: pg_regress/pg_isolation_regress: Fix possible nullptr dereference.
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: pg_regress/pg_isolation_regress: Fix possible nullptr dereference. |
| Дата | |
| Msg-id | 1357296.1669827588@sss.pgh.pa.us обсуждение |
| Ответ на | pg_regress/pg_isolation_regress: Fix possible nullptr dereference. (Xing Guo <higuoxing@gmail.com>) |
| Список | 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
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера