Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd39a84a

Browse files
committed
Prevent isolated second surrogate in U& syntax
1 parentada0116 commitd39a84a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/backend/parser/scan.l

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Portions Copyright (c) 1994, Regents of the University of California
2525
*
2626
* IDENTIFICATION
27-
* $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.160 2009/09/2520:51:37 petere Exp $
27+
* $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.161 2009/09/2521:13:06 petere Exp $
2828
*
2929
*-------------------------------------------------------------------------
3030
*/
@@ -1223,6 +1223,9 @@ litbuf_udeescape(unsigned char escape, base_yyscan_t yyscanner)
12231223
yyerror("invalid Unicode surrogate pair");
12241224
}
12251225
}
1226+
elseif (is_utf16_surrogate_second(unicode))
1227+
yyerror("invalid Unicode surrogate pair");
1228+
12261229
if (is_utf16_surrogate_first(unicode))
12271230
pair_first = unicode;
12281231
else
@@ -1253,6 +1256,9 @@ litbuf_udeescape(unsigned char escape, base_yyscan_t yyscanner)
12531256
yyerror("invalid Unicode surrogate pair");
12541257
}
12551258
}
1259+
elseif (is_utf16_surrogate_second(unicode))
1260+
yyerror("invalid Unicode surrogate pair");
1261+
12561262
if (is_utf16_surrogate_first(unicode))
12571263
pair_first = unicode;
12581264
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp