Return early if json parsing fails

Fixes #505
pull/509/head
Timothy Stack 6 years ago
parent e4432cfdeb
commit 0a8b740807

@ -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;

@ -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];
}

Loading…
Cancel
Save