Skip to content

Commit

Permalink
json: report unexpected EOF in cache_json_file()
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Szakacs <[email protected]>
  • Loading branch information
alltilla committed Dec 11, 2024
1 parent 7c9d975 commit 3662dd8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/json/filterx-cache-json-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ _load_json_file(const gchar *filepath, GError **error)
if (ferror(file))
g_set_error(error, CACHE_JSON_FILE_ERROR, CACHE_JSON_FILE_ERROR_FILE_READ_ERROR,
"failed to read file: %s (%s)", filepath, g_strerror(errno));
else
g_set_error(error, CACHE_JSON_FILE_ERROR, CACHE_JSON_FILE_ERROR_FILE_READ_ERROR,
"failed to read file: %s (unexpected EOF)", filepath);
break;
}

Expand Down

0 comments on commit 3662dd8

Please sign in to comment.