diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-14 11:31:22 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-14 11:31:44 -0400 |
commit | 39b3ea714212c6ea2878509303a89edd24a0a6b7 (patch) | |
tree | 2f5082aa5174357891a621e7026d1604663fb688 | |
parent | 78b597808108a9837b7cc3660eec4ddb9471ab2f (diff) | |
download | postgresql-39b3ea714212c6ea2878509303a89edd24a0a6b7.tar.gz |
Add missing NULL terminator to list_SECURITY_LABEL_preposition[].
On the machines I tried this on, pressing TAB after SECURITY LABEL led to
being offered ON and FOR as intended, plus random other keywords (varying
across machines). But if you were a bit more unlucky you'd get a crash,
as reported by nummervet@mail.ru in bug #14019.
Seems to have been an aboriginal error in the SECURITY LABEL patch,
commit 4d355a8336e0f226. Hence, back-patch to all supported versions.
There's no bug in HEAD, though, thanks to our recent tab-completion
rewrite.
-rw-r--r-- | src/bin/psql/tab-complete.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 3473dc91bc..6af3efd156 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -2608,7 +2608,7 @@ psql_completion(char *text, int start, int end) pg_strcasecmp(prev_wd, "LABEL") == 0) { static const char *const list_SECURITY_LABEL_preposition[] = - {"ON", "FOR"}; + {"ON", "FOR", NULL}; COMPLETE_WITH_LIST(list_SECURITY_LABEL_preposition); } |