aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-12-06 11:45:52 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-12-06 11:45:52 +0000
commit7a9000757ddcefbb3013c2218e5d43d92acc7e38 (patch)
tree2ddcf1deab958d122d64b874d8c396216409533c /contrib
parentdf914aa64f9f9b6c5a472a438f5d6f7991d26068 (diff)
downloadrspamd-7a9000757ddcefbb3013c2218e5d43d92acc7e38.tar.gz
rspamd-7a9000757ddcefbb3013c2218e5d43d92acc7e38.zip
[Minor] Backport ucl fix
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libucl/ucl_parser.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/libucl/ucl_parser.c b/contrib/libucl/ucl_parser.c
index 1d285f27d..8ccbf05af 100644
--- a/contrib/libucl/ucl_parser.c
+++ b/contrib/libucl/ucl_parser.c
@@ -850,6 +850,10 @@ ucl_maybe_parse_number (ucl_object_t *obj,
dv *= ucl_lex_num_multiplier (*p, false);
}
p += 2;
+ if (end - p > 0 && !ucl_lex_is_atom_end (*p)) {
+ *pos = start;
+ return EINVAL;
+ }
goto set_obj;
}
else if (number_bytes || (p[1] == 'b' || p[1] == 'B')) {
@@ -860,6 +864,10 @@ ucl_maybe_parse_number (ucl_object_t *obj,
}
lv *= ucl_lex_num_multiplier (*p, true);
p += 2;
+ if (end - p > 0 && !ucl_lex_is_atom_end (*p)) {
+ *pos = start;
+ return EINVAL;
+ }
goto set_obj;
}
else if (ucl_lex_is_atom_end (p[1])) {
@@ -884,6 +892,10 @@ ucl_maybe_parse_number (ucl_object_t *obj,
is_time = true;
dv *= 60.;
p += 3;
+ if (end - p > 0 && !ucl_lex_is_atom_end (*p)) {
+ *pos = start;
+ return EINVAL;
+ }
goto set_obj;
}
}
@@ -896,6 +908,10 @@ ucl_maybe_parse_number (ucl_object_t *obj,
lv *= ucl_lex_num_multiplier (*p, number_bytes);
}
p ++;
+ if (end - p > 0 && !ucl_lex_is_atom_end (*p)) {
+ *pos = start;
+ return EINVAL;
+ }
goto set_obj;
}
break;