git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 983bdc4)
Add missing check of noError parameter in euc_tw_and_big5.c
2021年7月21日 13:11:32 +0000 (09:11 -0400)
2021年7月21日 13:11:32 +0000 (09:11 -0400)
Oversight in ea1b99a66

Yukun Wang

Backpatch to v14 where this parameter was introduced

Discussion: https://www.postgresql.org/message-id/flat/OS0PR01MB6003FCEFF0201EF21685FD33B4E39%40OS0PR01MB6003.jpnprd01.prod.outlook.com


diff --git a/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c b/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c
index 4bf8acda99fe909c67737507cdf69a4a9d89183b..e9f1d61af80c66ad4f24f3e43f8ca2eb33f4665c 100644 (file)
--- a/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c
+++ b/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c
@@ -286,8 +286,12 @@ big52euc_tw(const unsigned char *big5, unsigned char *p, int len, bool noError)
{
/* ASCII */
if (c1 == 0)
+ {
+ if (noError)
+ break;
report_invalid_encoding(PG_BIG5,
(const char *) big5, len);
+ }
*p++ = c1;
big5++;
len--;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /