postgresql/src/bin
Heikki Linnakangas 1c95b5eea6 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.
2012-10-15 10:54:33 +03:00
..
initdb Fix race condition in pg_ctl reading postmaster.pid. 2012-10-15 10:54:33 +03:00
pg_config Translation updates 2012-08-14 16:32:19 -04:00
pg_controldata Translation updates 2012-08-14 16:32:19 -04:00
pg_ctl Fix race condition in pg_ctl reading postmaster.pid. 2012-10-15 10:54:33 +03:00
pg_dump Fix bugs in "restore.sql" script emitted in pg_dump tar output. 2012-09-29 17:56:54 -04:00
pg_resetxlog Translation updates 2012-08-14 16:32:19 -04:00
pgevent Allow vpath builds and regression tests to succeed on Mingw. Backpatch to release 8.4 - earlier releases would require more changes and it's not worth the trouble. 2010-12-24 13:31:48 -05:00
psql Translation updates 2012-08-14 16:32:19 -04:00
scripts Translation updates 2012-08-14 16:32:19 -04:00
Makefile Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00