From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix off-by-one in memory allocation for quote_literal_cstr(). |
Date: | 2016-12-16 10:58:17 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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.
Branch
------
REL9_3_STABLE
Modified Files
--------------
src/backend/utils/adt/quote.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-12-16 14:44:33 | pgsql: Remove _hash_wrtbuf() in favor of calling MarkBufferDirty(). |
Previous Message | Tom Lane | 2016-12-15 19:36:02 | pgsql: Sync our copy of the timezone library with IANA release tzcode20 |