Fix off-by-one in memory allocation for quote_literal_cstr().
The calculation didn't take into account the NULL terminator. That lead
to overwriting the palloc'd buffer by one byte, if the input consists
entirely of backslashes. For example "format('%L', E'\\')".
Fixes bug #14468. Backpatch to all supported versions.
Report:
https://www.postgresql.org/message-id/20161216105001.13334.42819%40wrigleys.postgresql.org
Branch
------
REL9_3_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/e71fe84708174b3ae56add6d2ad98e9c91f84589
Modified Files
--------------
src/backend/utils/adt/quote.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers