Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 004874b

Browse files
committed
Add missing check of noError parameter in euc_tw_and_big5.c
Oversight in ea1b99a Yukun Wang Backpatch to v14 where this parameter was introduced Discussion: https://www.postgresql.org/message-id/flat/OS0PR01MB6003FCEFF0201EF21685FD33B4E39%40OS0PR01MB6003.jpnprd01.prod.outlook.com
1 parent 983bdc4 commit 004874b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,12 @@ big52euc_tw(const unsigned char *big5, unsigned char *p, int len, bool noError)
286286
{
287287
/* ASCII */
288288
if (c1 == 0)
289+
{
290+
if (noError)
291+
break;
289292
report_invalid_encoding(PG_BIG5,
290293
(const char *) big5, len);
294+
}
291295
*p++ = c1;
292296
big5++;
293297
len--;

0 commit comments

Comments
 (0)