|
24 | 24 | * Portions Copyright (c) 1994, Regents of the University of California
|
25 | 25 | *
|
26 | 26 | * 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 $ |
28 | 28 | *
|
29 | 29 | *-------------------------------------------------------------------------
|
30 | 30 | */
|
@@ -1223,6 +1223,9 @@ litbuf_udeescape(unsigned char escape, base_yyscan_t yyscanner)
|
1223 | 1223 | yyerror("invalid Unicode surrogate pair");
|
1224 | 1224 | }
|
1225 | 1225 | }
|
| 1226 | +elseif (is_utf16_surrogate_second(unicode)) |
| 1227 | +yyerror("invalid Unicode surrogate pair"); |
| 1228 | + |
1226 | 1229 | if (is_utf16_surrogate_first(unicode))
|
1227 | 1230 | pair_first = unicode;
|
1228 | 1231 | else
|
@@ -1253,6 +1256,9 @@ litbuf_udeescape(unsigned char escape, base_yyscan_t yyscanner)
|
1253 | 1256 | yyerror("invalid Unicode surrogate pair");
|
1254 | 1257 | }
|
1255 | 1258 | }
|
| 1259 | +elseif (is_utf16_surrogate_second(unicode)) |
| 1260 | +yyerror("invalid Unicode surrogate pair"); |
| 1261 | + |
1256 | 1262 | if (is_utf16_surrogate_first(unicode))
|
1257 | 1263 | pair_first = unicode;
|
1258 | 1264 | else
|
|