Change max json area length type to unsigned.

We use uint64_t for max json length everywhere else
including config.json_size field in LUKS2 metadata.

Also renames some misleading parameter names.
This commit is contained in:
Ondrej Kozina
2018-11-21 10:26:28 +01:00
committed by Milan Broz
parent 7713df9e41
commit c3a54aa59a
2 changed files with 18 additions and 17 deletions

View File

@@ -58,7 +58,7 @@ json_object *LUKS2_get_tokens_jobj(struct luks2_hdr *hdr);
void hexprint_base64(struct crypt_device *cd, json_object *jobj,
const char *sep, const char *line_sep);
json_object *parse_json_len(const char *json_area, int length, int *end_offset);
json_object *parse_json_len(const char *json_area, uint64_t max_length, int *json_len);
uint64_t json_object_get_uint64(json_object *jobj);
uint32_t json_object_get_uint32(json_object *jobj);
json_object *json_object_new_uint64(uint64_t value);