Missing NULL check after calling ecpg_strdup
Evgeniy Gorbanev <gorbanyoves@basealt.ru>
From: Evgeniy Gorbanev <gorbanyoves@basealt.ru>
To: pgsql-hackers@lists.postgresql.org
Date: 2025-07-11T10:27:59Z
Lists: pgsql-hackers
Attachments
- ecpglib-execute-check-ecpg_strdup.patch (text/x-patch) patch
Hi! In case of out_of_memory, the ecpg_strdup function may return NULL. Checks should be added in src/interfaces/ecpg/ecpglib/execute.c. Patch attached. Found by Linux Verification Center (linuxtesting.org) with SVACE. -- Best regards, Evgeniy Gorbanev
Commits
-
ecpg: Improve error detection around ecpg_strdup()
- a6eabec6808c 19 (unreleased) landed
-
ecpg: Fix NULL pointer dereference during connection lookup
- c934d5673894 13.22 landed
- 408fe659a890 14.19 landed
- 0123922f82d2 15.14 landed
- 313d3102facd 16.10 landed
- 2805e1c1edd5 17.6 landed
- 0ded7615d8ca 18.0 landed
- 1b8bbee05d70 19 (unreleased) landed