| 1881 | } |
| 1882 | |
| 1883 | static int jl_validate_arguments(const char *file_path, const char *const *object_path, |
| 1884 | size_t path_len, const char *entry_key) { |
| 1885 | if (!file_path || !*file_path || !object_path || !entry_key || path_len >= JL_MAX_DEPTH) { |
| 1886 | return -1; |
| 1887 | } |
| 1888 | if (jl_validate_key(entry_key) != 0) { |
| 1889 | return -1; |
| 1890 | } |
| 1891 | for (size_t i = 0; i < path_len; i++) { |
| 1892 | if (jl_validate_key(object_path[i]) != 0) { |
| 1893 | return -1; |
| 1894 | } |
| 1895 | } |
| 1896 | return 0; |
| 1897 | } |
| 1898 | |
| 1899 | static int jl_build_fresh(const char *const *object_path, size_t path_len, const char *entry_key, |
| 1900 | const char *entry_json, size_t entry_length, char **result_out, |
no test coverage detected