diff --git a/epan/export_object.h b/epan/export_object.h index 72e053571b..a2278b7d3c 100644 --- a/epan/export_object.h +++ b/epan/export_object.h @@ -23,15 +23,7 @@ typedef struct _export_object_entry_t { gchar *hostname; gchar *content_type; gchar *filename; - /* We need to store a 64 bit integer to hold a file length - (was guint payload_len;) - - XXX - we store the entire object in the program's address space, - so the *real* maximum object size is size_t; if we were to export - objects by going through all of the packets containing data from - the object, one packet at a time, and write the object incrementally, - we could support objects that don't fit into the address space. */ - gint64 payload_len; + size_t payload_len; guint8 *payload_data; } export_object_entry_t; diff --git a/sharkd_session.c b/sharkd_session.c index 6684136599..eb6aa5b603 100644 --- a/sharkd_session.c +++ b/sharkd_session.c @@ -2046,7 +2046,7 @@ sharkd_session_process_tap_eo_cb(void *tapdata) sharkd_json_value_stringf("_download", "%s_%d", object_list->type, i); - sharkd_json_value_anyf("len", "%" G_GINT64_FORMAT, eo_entry->payload_len); + sharkd_json_value_anyf("len", "%zu", eo_entry->payload_len); json_dumper_end_object(&dumper); @@ -4070,7 +4070,7 @@ sharkd_session_process_download(char *buf, const jsmntok_t *tokens, int count) json_dumper_begin_object(&dumper); sharkd_json_value_string("file", filename); sharkd_json_value_string("mime", mime); - sharkd_json_value_base64("data", eo_entry->payload_data, (size_t) eo_entry->payload_len); + sharkd_json_value_base64("data", eo_entry->payload_data, eo_entry->payload_len); json_dumper_end_object(&dumper); json_dumper_finish(&dumper); }