]> 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:25 +0000 (12:56 -0400)
commit39d4c764da3d4dd74238d82b0e5ccd1030ebf9f7
tree51c7a50f41c79c905fef0c001632765e4e160b0b
parentc99e0d382f811cf0fbad50e912183ed4eb7b8de8
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