diff options
author | Fujii Masao <fujii@postgresql.org> | 2014-09-05 02:17:57 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2014-09-05 02:19:14 +0900 |
commit | 6da740e72ebfe22cb2a40bf9ebd775531a2294a6 (patch) | |
tree | ac5dc7c3109f8b2182a809b2d5a17e249d578bae /src | |
parent | 643cad19346bc7d6e16663ee9ff6f7a6ef009d93 (diff) | |
download | postgresql-6da740e72ebfe22cb2a40bf9ebd775531a2294a6.tar.gz postgresql-6da740e72ebfe22cb2a40bf9ebd775531a2294a6.zip |
Fix segmentation fault that an empty prepared statement could cause.
Back-patch to all supported branches.
Per bug #11335 from Haruka Takatsuka
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/tcop/utility.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 0558ea34b05..18c74525fa0 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -2452,6 +2452,9 @@ GetCommandLogLevel(Node *parsetree) { LogStmtLevel lev; + if (parsetree == NULL) + return LOGSTMT_ALL; + switch (nodeTag(parsetree)) { /* raw plannable queries */ |