aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/utils/mb/conv.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/backend/utils/mb/conv.c b/src/backend/utils/mb/conv.c
index ab2e966f1cf..63a2d4a8fb0 100644
--- a/src/backend/utils/mb/conv.c
+++ b/src/backend/utils/mb/conv.c
@@ -382,6 +382,11 @@ UtfToLocal(const unsigned char *utf, unsigned char *iso,
iutf |= *utf++ << 8;
iutf |= *utf++;
}
+ else
+ {
+ elog(ERROR, "unsupported character length %d", l);
+ iutf = 0; /* keep compiler quiet */
+ }
/*
* first, try with combined map if possible
@@ -437,6 +442,11 @@ UtfToLocal(const unsigned char *utf, unsigned char *iso,
iutf |= *utf++ << 8;
iutf |= *utf++;
}
+ else
+ {
+ elog(ERROR, "unsupported character length %d", l);
+ iutf = 0; /* keep compiler quiet */
+ }
cutf[1] = iutf;
cp = bsearch(cutf, cmap, size2,
@@ -546,6 +556,11 @@ LocalToUtf(const unsigned char *iso, unsigned char *utf,
iiso |= *iso++ << 8;
iiso |= *iso++;
}
+ else
+ {
+ elog(ERROR, "unsupported character length %d", l);
+ iiso = 0; /* keep compiler quiet */
+ }
p = bsearch(&iiso, map, size1,
sizeof(pg_local_to_utf), compare2);