pgsql: Add checks for valid multibyte character length in UtfToLocal, L

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add checks for valid multibyte character length in UtfToLocal, L
Date: 2013-07-19 01:55:50
Message-ID: E1UzzvC-0003Zp-Pq@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add checks for valid multibyte character length in UtfToLocal, LocalToUtf.

This is mainly to suppress "uninitialized variable" warnings from very
recent versions of gcc. But it seems like a good robustness thing anyway,
not to mention that we might someday decide to support 6-byte UTF8.

Per report from Karol Trzcionka. No back-patch since there's no reason
at the moment to think this is more than cosmetic.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d9f37e6661ec654f7252bfc23e084c9e2ca5db14

Modified Files
--------------
src/backend/utils/mb/conv.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Meskes 2013-07-19 07:05:54 pgsql: Initialize day of year value.
Previous Message Tom Lane 2013-07-19 01:23:47 pgsql: Fix regex match failures for backrefs combined with non-greedy q