diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-10-26 22:40:03 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-10-26 22:40:03 +0100 |
commit | dac24787dff6273cc2b6c1584cb255f6b24a0238 (patch) | |
tree | 37ccc5d567f222ed63dcf696b7278f73c7f8feb2 /src/ucl/utils | |
parent | 47f9952f1a0580585feb1204976f21deb53a338e (diff) | |
download | rspamd-dac24787dff6273cc2b6c1584cb255f6b24a0238.tar.gz rspamd-dac24787dff6273cc2b6c1584cb255f6b24a0238.zip |
Update from libucl.
Diffstat (limited to 'src/ucl/utils')
-rw-r--r-- | src/ucl/utils/chargen.c | 4 | ||||
-rw-r--r-- | src/ucl/utils/objdump.c | 13 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/ucl/utils/chargen.c b/src/ucl/utils/chargen.c index 724b37899..d6fa86a20 100644 --- a/src/ucl/utils/chargen.c +++ b/src/ucl/utils/chargen.c @@ -98,6 +98,10 @@ main (int argc, char **argv) i == '"' || i == '\f') { r += print_flag ("UCL_CHARACTER_JSON_UNSAFE", &need_or, valbuf + r); } + if (i == '\n' || i == '\r' || i == '\\' || i == '\b' || i == '\t' || + i == '"' || i == '\f' || i == '=' || i == ':' || i == '{' || i == '[' || i == ' ') { + r += print_flag ("UCL_CHARACTER_UCL_UNSAFE", &need_or, valbuf + r); + } if (!need_or) { r += print_flag ("UCL_CHARACTER_DENIED", &need_or, valbuf + r); diff --git a/src/ucl/utils/objdump.c b/src/ucl/utils/objdump.c index 985106a09..8ba0ac261 100644 --- a/src/ucl/utils/objdump.c +++ b/src/ucl/utils/objdump.c @@ -95,7 +95,6 @@ main(int argc, char **argv) const char *fn = NULL; char inbuf[8192]; struct ucl_parser *parser; - UT_string *err = NULL; int k, ret = 0; ucl_object_t *obj = NULL; ucl_object_t *par; @@ -118,18 +117,18 @@ main(int argc, char **argv) parser = ucl_parser_new (0); while (!feof (in)) { fread (inbuf, sizeof (inbuf), 1, in); - ucl_parser_add_chunk (parser, inbuf, strlen (inbuf), &err); + ucl_parser_add_chunk (parser, inbuf, strlen (inbuf)); } fclose (in); - if (err != NULL ) { - printf ("Error occured: %s\n", err->d); + if (ucl_parser_get_error(parser) ) { + printf ("Error occured: %s\n", ucl_parser_get_error(parser)); ret = 1; goto end; } - obj = ucl_parser_get_object (parser, &err); - if (err != NULL ) { - printf ("Error occured: %s\n", err->d); + obj = ucl_parser_get_object (parser); + if (ucl_parser_get_error(parser)) { + printf ("Error occured: %s\n", ucl_parser_get_error(parser)); ret = 1; goto end; } |