File: java25-increase-entity-limit.patch

package info (click to toggle)
scilab 2024.1.0%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 383,424 kB
  • sloc: xml: 765,066; ansic: 280,346; cpp: 264,881; java: 172,629; fortran: 91,526; ml: 23,103; tcl: 16,853; makefile: 9,715; sh: 7,027; f90: 6,437; lex: 1,656; perl: 1,566; yacc: 1,308; php: 690; cs: 613; javascript: 50
file content (21 lines) | stat: -rw-r--r-- 1,857 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Increase xml entity size limit
 Java 25 includes limits for the number of xml entitities
 to prevent billion laughs attack.
 This patch increases the limit to allow documentation
 generation to succeed.
Author: Vladimir Petko <vladimir.petko@canonical.com>
Bug: https://gitlab.com/scilab/scilab/-/issues/17536
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1128173
Last-Update: 2026-02-25

--- a/scilab/Makefile.am
+++ b/scilab/Makefile.am
@@ -305,7 +305,7 @@
 				LANG=$$l.UTF-8 SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 _JAVA_OPTIONS='-Djava.awt.headless=true' HOME=/tmp $(top_builddir)/bin/scilab-adv-cli -noatomsautoload -nb -l $$l -nouserstartup -e "$$COMMAND" || exit 1;\
 			else \
 				echo "LANG=$$l.UTF-8 LC_ALL=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 _JAVA_OPTIONS='-Djava.awt.headless=true' HOME=/tmp $(top_builddir)/bin/scilab-adv-cli -noatomsautoload -nb -l $$l.UTF-8 -nouserstartup -e \"$$COMMAND\"";\
-				LANG=$$l.UTF-8 LC_ALL=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 _JAVA_OPTIONS="-Djava.awt.headless=true -Djava.library.path=/usr/lib/jni:$$(find . -name "*.so" -a -wholename "*modules*" | sed 's/\/[^/]*$$//' | sort | uniq | tr '\n' ':' | sed 's/:$$//')" HOME=/tmp $(top_builddir)/bin/scilab-adv-cli -noatomsautoload -nb -l $$l.UTF-8 -nouserstartup -e "$$COMMAND" || exit 1;\
+				LANG=$$l.UTF-8 LC_ALL=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 _JAVA_OPTIONS="-Djdk.xml.totalEntitySizeLimit=0 -Djdk.xml.maxGeneralEntitySizeLimit=0 -Djdk.xml.entityReplacementLimit=0 -Djava.awt.headless=true -Djava.library.path=/usr/lib/jni:$$(find . -name "*.so" -a -wholename "*modules*" | sed 's/\/[^/]*$$//' | sort | uniq | tr '\n' ':' | sed 's/:$$//')" HOME=/tmp $(top_builddir)/bin/scilab-adv-cli -noatomsautoload -nb -l $$l.UTF-8 -nouserstartup -e "$$COMMAND" || exit 1;\
 			fi; \
 		done; \
 	else \