tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

08_dont_ignore_undeclared_entity.patch (1194B)


      1 diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c
      2 --- a/expat/lib/xmlparse.c
      3 +++ b/expat/lib/xmlparse.c
      4 @@ -3028,9 +3028,15 @@ doContentInternal(XML_Parser parser, int
      5       } else if (! entity) {
      6         if (parser->m_skippedEntityHandler)
      7           parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
      8 +/* BEGIN MOZILLA CHANGE (Bug 35984 - Undeclared entities are ignored when external DTD not found) */
      9 +#if 0
     10         else if (parser->m_defaultHandler)
     11           reportDefault(parser, enc, s, next);
     12         break;
     13 +#else
     14 +        return XML_ERROR_UNDEFINED_ENTITY;
     15 +#endif
     16 +/* END MOZILLA CHANGE */
     17       }
     18       if (entity->open)
     19         return XML_ERROR_RECURSIVE_ENTITY_REF;
     20 @@ -6229,7 +6235,13 @@ appendAttributeValue(XML_Parser parser, 
     21         if ((pool == &parser->m_tempPool) && parser->m_defaultHandler)
     22           reportDefault(parser, enc, ptr, next);
     23         */
     24 +/* BEGIN MOZILLA CHANGE (Bug 35984 - Undeclared entities are ignored when external DTD not found) */
     25 +#if 0
     26         break;
     27 +#else
     28 +        return XML_ERROR_UNDEFINED_ENTITY;
     29 +#endif
     30 +/* END MOZILLA CHANGE */
     31       }
     32       if (entity->open) {
     33         if (enc == parser->m_encoding) {