Commit 32d45fcd authored by Daniel Salzman's avatar Daniel Salzman

zscanner: reset parser state upon input initialization

parent c482cbc6
/* Copyright (C) 2015 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
/* Copyright (C) 2018 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
......@@ -260,6 +260,8 @@ int zs_set_input_string(
const char *input,
size_t size)
{
s->state = ZS_STATE_NONE;
return set_input_string(s, input, size, false);
}
......@@ -351,6 +353,8 @@ int zs_set_input_file(
return -1;
}
s->state = ZS_STATE_NONE;
return 0;
}
......@@ -5623,6 +5623,8 @@ int zs_set_input_string(
const char *input,
size_t size)
{
s->state = ZS_STATE_NONE;
return set_input_string(s, input, size, false);
}
......@@ -5714,6 +5716,8 @@ int zs_set_input_file(
return -1;
}
s->state = ZS_STATE_NONE;
return 0;
}
......
......@@ -261,6 +261,8 @@ int zs_set_input_string(
const char *input,
size_t size)
{
s->state = ZS_STATE_NONE;
return set_input_string(s, input, size, false);
}
......@@ -352,6 +354,8 @@ int zs_set_input_file(
return -1;
}
s->state = ZS_STATE_NONE;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment