pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish().
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Fix Coverity warning about contrib/pgcrypto's mdc_finish(). |
| Дата | |
| Msg-id | E1YHFws-0001V2-R8@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Fix Coverity warning about contrib/pgcrypto's mdc_finish(). Coverity points out that mdc_finish returns a pointer to a local buffer (which of course is gone as soon as the function returns), leaving open a risk of misbehaviors possibly as bad as a stack overwrite. In reality, the only possible call site is in process_data_packets() which does not examine the returned pointer at all. So there's no live bug, but nonetheless the code is confusing and risky. Refactor to avoid the issue by letting process_data_packets() call mdc_finish() directly instead of going through the pullf_read() API. Although this is only cosmetic, it seems good to back-patch so that the logic in pgp-decrypt.c stays in sync across all branches. Marko Kreen Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/a59ee881978a2027dced30053f8ad4cd8e143953 Modified Files -------------- contrib/pgcrypto/pgp-decrypt.c | 49 ++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 30 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера