mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
xsltMaxVars was only introduced in libxslt 1.1.27
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
12b73912f2
commit
74fad4a7ce
1 changed files with 5 additions and 0 deletions
5
file.c
5
file.c
|
|
@ -14,6 +14,9 @@
|
||||||
/* For SAMPLE_* */
|
/* For SAMPLE_* */
|
||||||
#include <libdivecomputer/parser.h>
|
#include <libdivecomputer/parser.h>
|
||||||
|
|
||||||
|
/* to check XSLT version number */
|
||||||
|
#include <libxslt/xsltconfig.h>
|
||||||
|
|
||||||
/* Crazy windows sh*t */
|
/* Crazy windows sh*t */
|
||||||
#ifndef O_BINARY
|
#ifndef O_BINARY
|
||||||
#define O_BINARY 0
|
#define O_BINARY 0
|
||||||
|
|
@ -869,7 +872,9 @@ int parse_csv_file(const char *filename, int timef, int depthf, int tempf, int p
|
||||||
/* Increase the limits for recursion and variables on XSLT
|
/* Increase the limits for recursion and variables on XSLT
|
||||||
* parsing */
|
* parsing */
|
||||||
xsltMaxDepth = 30000;
|
xsltMaxDepth = 30000;
|
||||||
|
#if LIBXSLT_VERSION > 10126
|
||||||
xsltMaxVars = 150000;
|
xsltMaxVars = 150000;
|
||||||
|
#endif
|
||||||
|
|
||||||
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
Add a link
Reference in a new issue