summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorHeikki Linnakangas2012-10-13 09:48:14 +0000
committerHeikki Linnakangas2012-10-15 07:36:32 +0000
commit5c89684e08cda82727bd8bdad155b9235fb7246e (patch)
tree6f14667b03ba3ca12057c627f18fede6ab897f6d /src/include
parente81e8f9342b037246b284bad15e42e21b1929301 (diff)
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/include')
0 files changed, 0 insertions, 0 deletions