Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | buffer |
struct | hole |
Macros | |
#define | EFTYPE EINVAL |
#define | MY_MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | FRAGMENT_SIZE (8 * 1024) |
#define | MARK_BEGIN "NiH0" |
#define | MARK_DATA "NiH1" |
#define | MARK_NUL "NiH2" |
Typedefs | |
typedef struct buffer | buffer_t |
typedef struct hole | hole_t |
#define EFTYPE EINVAL |
Definition at line 47 of file source_hole.c.
#define FRAGMENT_SIZE (8 * 1024) |
Definition at line 53 of file source_hole.c.
#define MARK_BEGIN "NiH0" |
Definition at line 55 of file source_hole.c.
#define MARK_DATA "NiH1" |
Definition at line 56 of file source_hole.c.
#define MARK_NUL "NiH2" |
Definition at line 57 of file source_hole.c.
|
static |
Definition at line 105 of file source_hole.c.
References buffer::fragment, free(), i, buffer::nfragments, and NULL.
Referenced by buffer_from_file(), hole_free(), and source_hole_cb().
|
static |
Definition at line 123 of file source_hole.c.
References buffer_free(), buffer_new(), buffer_read_file(), ENOENT, error(), f, benchmark::FILE, flags, create_tags_rz::fname, NULL, ZIP_CREATE, ZIP_ER_MEMORY, zip_error_set(), and ZIP_TRUNCATE.
Referenced by hole_new().
|
static |
Definition at line 154 of file source_hole.c.
References buffer::fragment, FRAGMENT_SIZE, buffer::fragment_size, malloc(), buffer::nfragments, NULL, buffer::offset, and buffer::size.
Referenced by buffer_from_file(), and source_hole_cb().
|
static |
Definition at line 172 of file source_hole.c.
References buffer::fragment, buffer::fragment_size, i, length, memcpy(), memset(), MY_MIN, n, buffer::offset, buffer::size, and ZIP_INT64_MAX.
Referenced by source_hole_cb().
|
static |
Definition at line 208 of file source_hole.c.
References b, EFTYPE, error(), f, buffer::fragment, buffer::fragment_size, get_u64(), i, malloc(), MARK_BEGIN, MARK_DATA, MARK_NUL, buffer::nfragments, NULL, buffer::size, SIZE_MAX, ZIP_ER_INCONS, ZIP_ER_MEMORY, ZIP_ER_READ, and zip_error_set().
Referenced by buffer_from_file().
|
static |
Definition at line 283 of file source_hole.c.
References error(), length, buffer::offset, buffer::size, and zip_source_seek_compute_offset().
Referenced by source_hole_cb().
|
static |
Definition at line 296 of file source_hole.c.
References error(), f, benchmark::FILE, create_tags_rz::fname, buffer::fragment, buffer::fragment_size, i, MARK_BEGIN, MARK_DATA, NULL, only_nul(), buffer::size, write_nuls(), write_u64(), ZIP_ER_OPEN, ZIP_ER_WRITE, and zip_error_set().
Referenced by source_hole_cb().
|
static |
Definition at line 340 of file source_hole.c.
References error(), buffer::fragment, buffer::fragment_size, i, setup::idx, if(), length, malloc(), memcpy(), memset(), MY_MIN, n, buffer::nfragments, NULL, buffer::offset, only_nul(), realloc(), buffer::size, ZIP_ER_MEMORY, and zip_error_set().
Referenced by source_hole_cb().
|
static |
Definition at line 404 of file source_hole.c.
Referenced by buffer_read_file().
|
static |
Definition at line 454 of file source_hole.c.
References buffer_free(), hole::error, hole::fname, free(), hole::in, NULL, hole::out, and zip_error_fini().
Referenced by source_hole_cb().
|
static |
Definition at line 467 of file source_hole.c.
References buffer_from_file(), ctx::error, error(), flags, create_tags_rz::fname, free(), ctx::in, malloc(), NULL, ctx::out, strdup(), ZIP_ER_MEMORY, zip_error_init(), and zip_error_set().
Referenced by source_hole_create().
|
static |
|
static |
Definition at line 494 of file source_hole.c.
References buffer_free(), buffer_new(), buffer_read(), buffer_seek(), buffer_to_file(), buffer_write(), command, ctx::error, hole_free(), ctx::in, length, NULL, ctx::out, zip_stat::size, zip_stat::valid, ZIP_ER_OPNOTSUPP, zip_error_set(), zip_error_to_data(), ZIP_SOURCE_BEGIN_WRITE, ZIP_SOURCE_CLOSE, ZIP_SOURCE_COMMIT_WRITE, ZIP_SOURCE_ERROR, ZIP_SOURCE_FREE, ZIP_SOURCE_GET_ARGS, zip_source_make_command_bitmap(), ZIP_SOURCE_OPEN, ZIP_SOURCE_READ, ZIP_SOURCE_REMOVE, ZIP_SOURCE_ROLLBACK_WRITE, ZIP_SOURCE_SEEK, ZIP_SOURCE_SEEK_WRITE, ZIP_SOURCE_STAT, ZIP_SOURCE_SUPPORTS, ZIP_SOURCE_TELL, ZIP_SOURCE_TELL_WRITE, ZIP_SOURCE_WRITE, and ZIP_STAT_SIZE.
Referenced by source_hole_create().
zip_source_t* source_hole_create | ( | const char * | fname, |
int | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 94 of file source_hole.c.
References error(), flags, create_tags_rz::fname, hole_new(), NULL, source_hole_cb(), and zip_source_function_create().
Referenced by open_compressed(), and read_hole().
|
static |
Definition at line 428 of file source_hole.c.
References f, MARK_NUL, n, and write_u64().
Referenced by buffer_to_file().
|
static |