summaryrefslogtreecommitdiffstats
path: root/contrib/libucl/ucl_internal.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-05 20:01:28 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-10-05 21:17:18 +0100
commit8c18e5c97c77d73eda809ef474354ab0efbaf773 (patch)
treef2d9d9af656f218c72734654408a53bea87a4465 /contrib/libucl/ucl_internal.h
parent2e216b23b14ef9485e358989b63aa23dde094f5a (diff)
downloadrspamd-8c18e5c97c77d73eda809ef474354ab0efbaf773.tar.gz
rspamd-8c18e5c97c77d73eda809ef474354ab0efbaf773.zip
[Fix] Slashing: backport chunk logic from libucl
Diffstat (limited to 'contrib/libucl/ucl_internal.h')
-rw-r--r--contrib/libucl/ucl_internal.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/contrib/libucl/ucl_internal.h b/contrib/libucl/ucl_internal.h
index 4ddc713b5..8c16dce8b 100644
--- a/contrib/libucl/ucl_internal.h
+++ b/contrib/libucl/ucl_internal.h
@@ -148,6 +148,7 @@ enum ucl_parser_state {
UCL_STATE_OBJECT,
UCL_STATE_ARRAY,
UCL_STATE_KEY,
+ UCL_STATE_KEY_OBRACE,
UCL_STATE_VALUE,
UCL_STATE_AFTER_VALUE,
UCL_STATE_ARRAY_VALUE,
@@ -185,16 +186,30 @@ struct ucl_macro {
UT_hash_handle hh;
};
+enum ucl_stack_flags {
+ UCL_STACK_HAS_OBRACE = (1u << 0),
+ UCL_STACK_MAX = (1u << 1),
+};
+
struct ucl_stack {
ucl_object_t *obj;
struct ucl_stack *next;
- uint64_t level;
+ union {
+ struct {
+ uint16_t level;
+ uint16_t flags;
+ uint32_t line;
+ } params;
+ uint64_t len;
+ } e;
+ struct ucl_chunk *chunk;
};
struct ucl_chunk {
const unsigned char *begin;
const unsigned char *end;
const unsigned char *pos;
+ char *fname;
size_t remain;
unsigned int line;
unsigned int column;