]> granicus.if.org Git - postgresql/commit
stringToNode() and deparse_expression_pretty() crash on invalid input,
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 30 Jun 2010 18:10:51 +0000 (18:10 +0000)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 30 Jun 2010 18:10:51 +0000 (18:10 +0000)
commitfc1adce4aa002bffd1f70ae470a38714cf0b7b23
treef1cd32a5dca2f812af25ac03c8e0331952f2c16d
parent8ce3f26fab743be87993ce9f688ac150a34d554c
stringToNode() and deparse_expression_pretty() crash on invalid input,
but we have nevertheless exposed them to users via pg_get_expr(). It would
be too much maintenance effort to rigorously check the input, so put a hack
in place instead to restrict pg_get_expr() so that the argument must come
from one of the system catalog columns known to contain valid expressions.

Per report from Rushabh Lathia. Backpatch to 7.4 which is the oldest
supported version at the moment.
src/backend/parser/parse_expr.c
src/backend/tcop/fastpath.c