Source code
Revision control
Copy as Markdown
Other Tools
diff --git a/expat/lib/xmltok.c b/expat/lib/xmltok.c
--- a/expat/lib/xmltok.c
+++ b/expat/lib/xmltok.c
@@ -707,7 +707,9 @@ unicode_byte_type(char hi, char lo) {
fromLim = *fromP + (((fromLim - *fromP) >> 1) << 1); /* shrink to even */ \
/* Avoid copying first half only of surrogate */ \
if (fromLim - *fromP > ((toLim - *toP) << 1) \
- && (GET_HI(fromLim - 2) & 0xF8) == 0xD8) { \
+/* BEGIN MOZILLA CHANGE (Only high surrogate mask) */ \
+ && (GET_HI(fromLim - 2) & 0xFC) == 0xD8) { \
+/* END MOZILLA CHANGE */ \
fromLim -= 2; \
res = XML_CONVERT_INPUT_INCOMPLETE; \
} \