]> granicus.if.org Git - postgresql/commit
psql: fix startup crash caused by PSQLRC containing a tilde
authorBruce Momjian <bruce@momjian.us>
Thu, 4 Apr 2013 16:56:21 +0000 (12:56 -0400)
committerBruce Momjian <bruce@momjian.us>
Thu, 4 Apr 2013 16:56:24 +0000 (12:56 -0400)
commit48a2cd370e2610f0a196240aed9f5abd82d3dada
tree91ef2b8624c09cc8086c5ccd5e85c036c111bcbe
parentbf2b0a147857f63daa2e5c17eed0169861371af8
psql:  fix startup crash caused by PSQLRC containing a tilde

'strdup' the PSQLRC environment variable value before calling a routine
that might free() it.

Backpatch to 9.2, where the bug first appeared.
src/bin/psql/common.c
src/bin/psql/common.h
src/bin/psql/startup.c