summaryrefslogtreecommitdiff
path: root/contrib/btree_gist/sql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-08-25 15:04:04 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-08-25 15:04:04 -0400
commitfb55e95396caa5f03dc37f72522313eb5c095ee1 (patch)
tree24a4fb6dd6db56c1302dbb68f5bf78fde7d38896 /contrib/btree_gist/sql
parent1fb2d78cb94672f4cfc0c1a2da9e0a534e3698f2 (diff)
Avoid platform-specific null pointer dereference in psql.
POSIX permits getopt() to advance optind beyond argc when the last argv entry is an option that requires an argument and hasn't got one. It seems that no major platforms actually do that, but musl does, so that something like "psql -f" would crash with that libc. Add a check that optind is in range before trying to look at the possibly-bogus option. Report and fix by Quentin Rameau. Back-patch to all supported branches. Discussion: https://postgr.es/m/20190825100617.GA6087@fifth.space
Diffstat (limited to 'contrib/btree_gist/sql')
0 files changed, 0 insertions, 0 deletions