postgresql/src/bin/initdb
Heikki Linnakangas 5c89684e08 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:36:32 +03:00
..
po Translation updates 2011-08-17 14:07:46 +03:00
.gitignore Simplify handling of the timezone GUC by making initdb choose the default. 2011-09-09 17:59:11 -04:00
findtimezone.c Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
initdb.c Fix race condition in pg_ctl reading postmaster.pid. 2012-10-15 10:36:32 +03:00
Makefile Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
nls.mk Add new files to NLS file lists 2012-03-30 20:46:23 +03:00