aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistxlog.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-10-13 12:48:14 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-10-15 10:54:40 +0300
commit288367427472f3d300c51ff9941eb486cfc01c6a (patch)
treeeed9d4145738647a1bbf41d6d9c8124f345ba001 /src/backend/access/gist/gistxlog.c
parenteb5e0d8488451bcfcf81e26fd82dd9687c99b941 (diff)
downloadpostgresql-288367427472f3d300c51ff9941eb486cfc01c6a.tar.gz
postgresql-288367427472f3d300c51ff9941eb486cfc01c6a.zip
Fix race condition in pg_ctl reading postmaster.pid.
If postmaster changed postmaster.pid while pg_ctl was reading it, pg_ctl could overrun the buffer it allocated for the file. Fix by reading the whole file to memory with one read() call. initdb contains an identical copy of the readfile() function, but the files that initdb reads are static, not modified concurrently. Nevertheless, add a simple bounds-check there, if only to silence static analysis tools. Per report from Dave Vitek. Backpatch to all supported branches.
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
0 files changed, 0 insertions, 0 deletions