Source commit: 9c620c4cc3ee3e11785c4a3816628fdf87d8756e
@@ -1765,6 +1765,7 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end,
POSITION *pos) {
while (HAS_CHAR(enc, ptr, end)) {
switch (BYTE_TYPE(enc, ptr)) {
+// The "if (end - ptr < n)" branch is a patch from chromium\third_party\expat\files\lib
# define LEAD_CASE(n) \
case BT_LEAD##n: \
if (end - ptr < n) { \