git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: cc7401d) | patch
waldump: fix use-after-free in search_directory().
2022年3月23日 23:38:43 +0000 (16:38 -0700)
2022年3月28日 01:13:50 +0000 (18:13 -0700)
commit 264d284929e0d5a419821f94f16f766b5497c87a
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.
src/bin/pg_waldump/pg_waldump.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /