| 1814 | } |
| 1815 | |
| 1816 | static int jl_validate_arguments(const char *file_path, const char *const *object_path, |
| 1817 | size_t path_len, const char *entry_key) { |
| 1818 | if (!file_path || !*file_path || !object_path || !entry_key || path_len >= JL_MAX_DEPTH) { |
| 1819 | return -1; |
| 1820 | } |
| 1821 | if (jl_validate_key(entry_key) != 0) { |
| 1822 | return -1; |
| 1823 | } |
| 1824 | for (size_t i = 0; i < path_len; i++) { |
| 1825 | if (jl_validate_key(object_path[i]) != 0) { |
| 1826 | return -1; |
| 1827 | } |
| 1828 | } |
| 1829 | return 0; |
| 1830 | } |
| 1831 | |
| 1832 | static int jl_build_fresh(const char *const *object_path, size_t path_len, const char *entry_key, |
| 1833 | const char *entry_json, size_t entry_length, char **result_out, |
no test coverage detected