diff options
author | Andres Freund <andres@anarazel.de> | 2022-03-23 16:38:43 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2022-03-27 18:15:14 -0700 |
commit | 344d89abf36b9ea559a4b25543bbc7d4206988f5 (patch) | |
tree | c853d09d51cc0648eb7a1fba55fbe11c9399ef2b /contrib/postgres_fdw/postgres_fdw.c | |
parent | 9016a2a3dc4ee7e41ecda5a8b3a3d3481de94964 (diff) | |
download | postgresql-344d89abf36b9ea559a4b25543bbc7d4206988f5.tar.gz postgresql-344d89abf36b9ea559a4b25543bbc7d4206988f5.zip |
waldump: fix use-after-free in search_directory().
After closedir() dirent->d_name is not valid anymore. As there alerady are a
few places relying on the limited lifetime of pg_waldump, do so here as well,
and just pg_strdup() the string.
The bug was introduced in fc49e24fa69a.
Found by UBSan, run locally.
Backpatch: 11-, like fc49e24fa69 itself.
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions