Files
Job Bautista 0f1faad9a3 Issue #2889 - Part 5: Rewrite patches for Expat 2.7.3.
- Skipped the fix for BZ 569229 because I don't know where to apply that; the
  processInternalEntity method no longer exists. Hopefully the bug doesn't re-
  appear.
- Previous fixes for 3rd and 13th patches have been merged to their respective
  patches as well.
- 15th patch is now a fix for the 13th and 14th since somewhere between 2.6.4
  and 2.7.3 has made use of a debugging method we don't want to use as well as
  a new boolean method called parserBusy which got mistakenly excluded as an
  unused API while rewriting the 14th patch.
2026-01-11 21:26:25 +08:00

14 lines
414 B
Diff

diff --git a/lib/xmlparse.c b/lib/xmlparse.c
--- a/lib/xmlparse.c
+++ b/lib/xmlparse.c
@@ -267,6 +267,9 @@
#define INIT_ATTS_SIZE 16
#define INIT_ATTS_VERSION 0xFFFFFFFF
#define INIT_BLOCK_SIZE 1024
+#ifdef MOZILLA_CLIENT /* Avoid slop in poolGrow() allocations */
+#define INIT_BLOCK_SIZE ((int)(1024 - (offsetof(BLOCK, s) / sizeof(XML_Char))))
+#endif
#define INIT_BUFFER_SIZE 1024
#define EXPAND_SPARE 24