mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
02e52c85b0
commit
3a3cebaabb
1 changed files with 5 additions and 0 deletions
5
file.c
5
file.c
|
@ -866,6 +866,11 @@ int parse_csv_file(const char *filename, int timef, int depthf, int tempf, int p
|
||||||
char curtime[TIMESTR];
|
char curtime[TIMESTR];
|
||||||
int previous;
|
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)
|
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);
|
return report_error(translate("gettextFromC", "Maximum number of supported columns on CSV import is %d"), MAXCOLS);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue