pgsql: Avoid dereferencing an undefined pointer in DecodeInterval().
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Avoid dereferencing an undefined pointer in DecodeInterval(). |
| Дата | |
| Msg-id | E1pRGVC-000mYP-7e@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Avoid dereferencing an undefined pointer in DecodeInterval(). Commit e39f99046 moved some code up closer to the start of DecodeInterval(), without noticing that it had been implicitly relying on previous checks to reject the case of empty input. Given empty input, we'd now dereference a pointer that hadn't been set, possibly leading to a core dump. (But if we fail to provoke a SIGSEGV, nothing bad happens, and the expected syntax error is thrown a bit later.) Per bug #17788 from Alexander Lakhin. Back-patch to v15 where the fault was introduced. Discussion: https://postgr.es/m/17788-dabac9f98f7eafd5@postgresql.org Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0ef65d0f55e5cec81fe98aba7c907dfc1b93923f Modified Files -------------- src/backend/utils/adt/datetime.c | 2 +- src/test/regress/expected/interval.out | 5 +++++ src/test/regress/sql/interval.sql | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера