Procházet zdrojové kódy

Comment to explain the difference against the official Expat code

Source commit: 9c620c4cc3ee3e11785c4a3816628fdf87d8756e
Martin Prikryl před 6 roky
rodič
revize
d58cdb594c
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      libs/expat/lib/xmltok_impl.c

+ 1 - 0
libs/expat/lib/xmltok_impl.c

@@ -1765,6 +1765,7 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end,
                        POSITION *pos) {
                        POSITION *pos) {
   while (HAS_CHAR(enc, ptr, end)) {
   while (HAS_CHAR(enc, ptr, end)) {
     switch (BYTE_TYPE(enc, ptr)) {
     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)                                                         \
 #  define LEAD_CASE(n)                                                         \
   case BT_LEAD##n:                                                             \
   case BT_LEAD##n:                                                             \
       if (end - ptr < n) { \
       if (end - ptr < n) { \