Return early if json parsing fails

Fixes #505
This commit is contained in:
Timothy Stack 2018-03-30 17:14:26 -07:00
parent e4432cfdeb
commit 0a8b740807
2 changed files with 5 additions and 1 deletions

View File

@ -842,6 +842,10 @@ void load_formats(const std::vector<std::string> &extra_paths,
load_from_path(*path_iter, errors);
}
if (!errors.empty()) {
return;
}
uint8_t mod_counter = 0;
vector<external_log_format *> alpha_ordered_formats;

View File

@ -115,7 +115,7 @@ yajl_render_error_string(yajl_handle hand, const unsigned char * jsonText,
for (i=0;i<spacesNeeded;i++) text[i] = ' ';
for (;start < end;start++, i++) {
if (jsonText[start] != '\n' && jsonText[start] != '\r')
if (jsonText[start] != '\n' && jsonText[start] != '\r' && jsonText[start] != '\t')
{
text[i] = jsonText[start];
}