summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-02-08 22:37:38 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-08 12:40:53 -0800
commit3a3cebaabb00ceebf170e8180711901fef8d9e3e (patch)
tree6ce1d3bee7bb8b7fc721f806f23467dd655ffee2 /file.c
parent02e52c85b06a8b741649de8f0c1b8b0183f2c165 (diff)
downloadsubsurface-3a3cebaabb00ceebf170e8180711901fef8d9e3e.tar.gz
Increase the limits for recursion and variables on XSLT parsing
This increases the limits when parsing CSV files with dive profiles, allowing us to import bigger files in one go. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'file.c')
-rw-r--r--file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/file.c b/file.c
index e03edaf82..b9cd5ba21 100644
--- a/file.c
+++ b/file.c
@@ -866,6 +866,11 @@ int parse_csv_file(const char *filename, int timef, int depthf, int tempf, int p
char curtime[TIMESTR];
int previous;
+ /* Increase the limits for recursion and variables on XSLT
+ * parsing */
+ xsltMaxDepth = 30000;
+ xsltMaxVars = 150000;
+
if (timef >= MAXCOLS || depthf >= MAXCOLS || tempf >= MAXCOLS || po2f >= MAXCOLS || cnsf >= MAXCOLS || ndlf >= MAXCOLS || cnsf >= MAXCOLS || stopdepthf >= MAXCOLS || pressuref >= MAXCOLS)
return report_error(translate("gettextFromC", "Maximum number of supported columns on CSV import is %d"), MAXCOLS);